Data gathering, wrangling, visualizing with health providers
Published
June 22, 2023
SelectHealth offers medical and dental insurance plans in Utah, Idaho, and Nevada. This post’s goal is to build a interactive tool which can identify providers in a map using their machine readable data!
After reading the data the next step is to gather the longitude and latitude for map usage. I use the ggmap package. (geocoded_data was ran previously and takes a while to run)
**NOTE:** ggmap requires some work in Google and registering your api. I will not go over that portion of this process. I originally attempted to use tidygeocoder, but found there is a HIPAA situation which prevented me from getting the correct longitude and latitude for specific facilities. I found using ggmap did not give me this error.
Code
# Get geocoordinates#addys <- data %>% # dplyr::distinct(addy)# Obtain coordinates using ggmap#geocoded_data <- addys %>%# ggmap::mutate_geocode(addy)#readr::write_csv(geocoded_data, "geocoded_data.csv")load(here::here(file ='posts/select health/geocoded_data.rda'))
Then some additional data wrangling after obtaining all geocodes.