Why Are Westerners Unhappy with their Health Insurance?
A presentation on teaching R with real data, and finding new insights by learning new R packages with real data. Also NCQA data on health insurance satisfaction, and why people in western US states are less satisfied with their health insurance
with their Health Insurance Peter D.R. Higgins, Megan McLeod, and Jeffrey Berinstein University of Michigan @ibddoctor Slide deck: https://speakerdeck.com/higgi13425
clincal data in R (tidy-biased) • Start with toy medical datasets • Move to real medical data as soon as possible • Learn with datasets that learners care about • Build in reproducible research practices early
Enrolled 1.8 million children Analyzed results with punch cards John Snow, MD Developed early version of geom_sf Removed pump handle Mona Hanna-Atisha, MD, MPH Wrangled data from EMR Compared lead levels
I wanted to • Learn rvest for harvesting data • Learn geom_sf for mapping • My patients are frequently unhappy with their health insurance • They have to select a health insurance plan each October • They have little information on which to base a selection ON HOLD WITH INSURANCE CO FOR 3 HOURS, STILL NO ANSWER
NCQA site: National Committee for Quality Assurance reports health insurance consumer satisfaction • Each private insurance plan rated on a 0-5 scale each year • Website http://healthinsuranceratings.ncqa.org/2018/ • 150 sub-websites, for 3 insurance types x 50 states, i.e. this link http://healthinsuranceratings.ncqa.org/2018/search/Commercial/AL This link provides ratings for private(Commercial vs. Medicaid and Medicare) insurance plans in Alabama
for (j in 1:length(instype)) { healthins <- read_html(paste0(link, "/", instype[j], "/", state_abbs[i])) onetable<- as.data.frame(healthins %>% html_nodes("table") %>% .[[3]] %>% html_table(fill=T)) if (i=1 & j =1) { fulltable <- onetable } else { fulltable <- bind_rows(fulltable, onetable) • Some cleaning of missing ratings, names of plans, etc. to get a clean dataframe • group_by() %>% summarize() to get the mean Commercial insurance plan satisfaction by state • Now map it Looping with rvest