Most people cannot afford to pay the high cost of health care on their own. That’s where health insurance comes in. The person with insurance usually pays a premium each month, and the insurer pays for a portion of the covered medical costs. Previous researches suggest that uninsured people tend to receive less medical care and therefore, have worse health outcomes. Lack of insurance is also a fiscal burden for both them and their families.
This report contains both a spatial and a non-spatial approach to analyze the percentage of people in the United States with no health insurance for the year 2016. The dataset on health insurance for the year 2016 was derived from the Social Explorer website, and can be accessed through this link - https://www.socialexplorer.com/tables/HD2016/R12144082.
The subjects of interest in this study are people aging 18 to 64 years. The variable with data of people (18-64 years old) without any health insurance is labeled as “SE_T006_003”. The county level shape file was derived using the tigris package in R.
library(tidyverse)
library(tmap)
library(tigris)
library(spdep)
library(sf)
library(tmaptools)
library(tigris)
options(tigris_class = "sf")
t_county <- counties(cb = TRUE)
##
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|==== | 5%
|
|==== | 6%
|
|==== | 7%
|
|===== | 7%
|
|===== | 8%
|
|====== | 9%
|
|====== | 10%
|
|======= | 10%
|
|======= | 11%
|
|======== | 12%
|
|======== | 13%
|
|========= | 13%
|
|========= | 14%
|
|========= | 15%
|
|========== | 15%
|
|========== | 16%
|
|=========== | 16%
|
|=========== | 17%
|
|=========== | 18%
|
|============ | 18%
|
|============ | 19%
|
|============= | 19%
|
|============= | 20%
|
|============= | 21%
|
|============== | 21%
|
|============== | 22%
|
|=============== | 22%
|
|=============== | 23%
|
|=============== | 24%
|
|================ | 24%
|
|================ | 25%
|
|================= | 26%
|
|================= | 27%
|
|================== | 27%
|
|================== | 28%
|
|=================== | 29%
|
|=================== | 30%
|
|==================== | 30%
|
|==================== | 31%
|
|===================== | 32%
|
|===================== | 33%
|
|====================== | 33%
|
|====================== | 34%
|
|======================= | 35%
|
|======================= | 36%
|
|======================== | 36%
|
|======================== | 37%
|
|======================== | 38%
|
|========================= | 38%
|
|========================= | 39%
|
|========================== | 39%
|
|========================== | 40%
|
|========================== | 41%
|
|=========================== | 41%
|
|=========================== | 42%
|
|============================ | 42%
|
|============================ | 43%
|
|============================ | 44%
|
|============================= | 44%
|
|============================= | 45%
|
|============================== | 45%
|
|============================== | 46%
|
|============================== | 47%
|
|=============================== | 47%
|
|=============================== | 48%
|
|================================ | 48%
|
|================================ | 49%
|
|================================ | 50%
|
|================================= | 50%
|
|================================= | 51%
|
|================================= | 52%
|
|================================== | 52%
|
|================================== | 53%
|
|=================================== | 53%
|
|=================================== | 54%
|
|=================================== | 55%
|
|==================================== | 55%
|
|==================================== | 56%
|
|===================================== | 56%
|
|===================================== | 57%
|
|===================================== | 58%
|
|====================================== | 58%
|
|====================================== | 59%
|
|======================================= | 59%
|
|======================================= | 60%
|
|======================================= | 61%
|
|======================================== | 61%
|
|======================================== | 62%
|
|========================================= | 62%
|
|========================================= | 63%
|
|========================================= | 64%
|
|========================================== | 64%
|
|========================================== | 65%
|
|=========================================== | 66%
|
|=========================================== | 67%
|
|============================================ | 67%
|
|============================================ | 68%
|
|============================================= | 69%
|
|============================================= | 70%
|
|============================================== | 70%
|
|============================================== | 71%
|
|=============================================== | 72%
|
|=============================================== | 73%
|
|================================================ | 73%
|
|================================================ | 74%
|
|================================================= | 75%
|
|================================================= | 76%
|
|================================================== | 76%
|
|================================================== | 77%
|
|================================================== | 78%
|
|=================================================== | 78%
|
|=================================================== | 79%
|
|==================================================== | 79%
|
|==================================================== | 80%
|
|==================================================== | 81%
|
|===================================================== | 81%
|
|===================================================== | 82%
|
|====================================================== | 82%
|
|====================================================== | 83%
|
|====================================================== | 84%
|
|======================================================= | 84%
|
|======================================================= | 85%
|
|======================================================== | 85%
|
|======================================================== | 86%
|
|======================================================== | 87%
|
|========================================================= | 87%
|
|========================================================= | 88%
|
|========================================================== | 88%
|
|========================================================== | 89%
|
|========================================================== | 90%
|
|=========================================================== | 90%
|
|=========================================================== | 91%
|
|============================================================ | 92%
|
|============================================================ | 93%
|
|============================================================= | 93%
|
|============================================================= | 94%
|
|============================================================= | 95%
|
|============================================================== | 95%
|
|============================================================== | 96%
|
|=============================================================== | 96%
|
|=============================================================== | 97%
|
|=============================================================== | 98%
|
|================================================================ | 98%
|
|================================================================ | 99%
|
|=================================================================| 99%
|
|=================================================================| 100%
names(t_county)
## [1] "STATEFP" "COUNTYFP" "COUNTYNS" "AFFGEOID" "GEOID" "NAME"
## [7] "LSAD" "ALAND" "AWATER" "geometry"
health_insurance <- read_csv("C:/Users/Nusrat/Desktop/Assignment 10 - Spatial Mapping/HealthInsurance.csv")
health_insurance <- health_insurance %>%
mutate(fips = parse_integer(Geo_FIPS))
t_county <- t_county %>%
mutate(fips = parse_integer(GEOID))
comb_data <- t_county %>%
left_join(health_insurance, by = "fips")
comb_data_sub <- subset(comb_data, STATEFP != "02") %>%
subset(STATEFP != "02") %>%
subset(STATEFP != "15") %>%
subset(STATEFP != "60") %>%
subset(STATEFP != "66") %>%
subset(STATEFP != "69") %>%
subset(STATEFP != "72") %>%
subset(STATEFP != "78")
tm_shape(comb_data_sub, projection = 2163) + tm_polygons("SE_T006_003")
tm_shape(comb_data_sub) + tm_polygons("SE_T006_003") + tm_shape(us_states) + tm_borders(lwd = .36, col = "black", alpha = 1)
tm_shape(comb_data_sub) + tm_polygons("SE_T006_003", border.col = "grey", border.alpha = .4) + tm_shape(us_states) + tm_borders(lwd = .36, col = "black", alpha = 1)
According to the map, the Northeast region of the United States has a low percentage of people without health insurance. The Southeast region and the West Coast of the United States have a higher percentage of people without health insurance. In few counties of Texas, Florida and the Northwest region have the darkest colored region, indicating the highest percentages of people (30-40%) without health insurance.
ggplot(data=comb_data_sub, aes(SE_T006_003)) + geom_histogram() + labs(title = "People Without Health Insurance") + ylab("Count") + xlab("Percentage of People Between 18 and 64 Without Health Insurance")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
The non-spatial approach at the county level data shown above gives an idea of how many counties there are in the United States with a certain percentage of people with no health insurance. One of the strengths of the non-spatial approach is that it allows for a better understanding of the numbers within the data. The non-spatial approach is one dimensional in the sense that only the general statistics of the data are provided with no other information on the data. The spatial approach on the other hand provides a more muti-dimensional view of the data. It provides a map and displays how the data is spread out throughout an area.
options(tigris_class = "sf")
t2_county <- counties(cb = FALSE)
##
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|==== | 5%
|
|==== | 6%
|
|==== | 7%
|
|===== | 7%
|
|===== | 8%
|
|====== | 8%
|
|====== | 9%
|
|====== | 10%
|
|======= | 10%
|
|======= | 11%
|
|======= | 12%
|
|======== | 12%
|
|======== | 13%
|
|========= | 13%
|
|========= | 14%
|
|========= | 15%
|
|========== | 15%
|
|========== | 16%
|
|=========== | 16%
|
|=========== | 17%
|
|=========== | 18%
|
|============ | 18%
|
|============ | 19%
|
|============= | 19%
|
|============= | 20%
|
|============= | 21%
|
|============== | 21%
|
|============== | 22%
|
|=============== | 22%
|
|=============== | 23%
|
|=============== | 24%
|
|================ | 24%
|
|================ | 25%
|
|================= | 25%
|
|================= | 26%
|
|================= | 27%
|
|================== | 27%
|
|================== | 28%
|
|=================== | 28%
|
|=================== | 29%
|
|=================== | 30%
|
|==================== | 30%
|
|==================== | 31%
|
|==================== | 32%
|
|===================== | 32%
|
|===================== | 33%
|
|====================== | 33%
|
|====================== | 34%
|
|====================== | 35%
|
|======================= | 35%
|
|======================= | 36%
|
|======================== | 36%
|
|======================== | 37%
|
|======================== | 38%
|
|========================= | 38%
|
|========================= | 39%
|
|========================== | 39%
|
|========================== | 40%
|
|========================== | 41%
|
|=========================== | 41%
|
|=========================== | 42%
|
|============================ | 42%
|
|============================ | 43%
|
|============================ | 44%
|
|============================= | 44%
|
|============================= | 45%
|
|============================== | 45%
|
|============================== | 46%
|
|============================== | 47%
|
|=============================== | 47%
|
|=============================== | 48%
|
|================================ | 48%
|
|================================ | 49%
|
|================================ | 50%
|
|================================= | 50%
|
|================================= | 51%
|
|================================= | 52%
|
|================================== | 52%
|
|================================== | 53%
|
|=================================== | 53%
|
|=================================== | 54%
|
|=================================== | 55%
|
|==================================== | 55%
|
|==================================== | 56%
|
|===================================== | 56%
|
|===================================== | 57%
|
|===================================== | 58%
|
|====================================== | 58%
|
|====================================== | 59%
|
|======================================= | 59%
|
|======================================= | 60%
|
|======================================= | 61%
|
|======================================== | 61%
|
|======================================== | 62%
|
|========================================= | 62%
|
|========================================= | 63%
|
|========================================= | 64%
|
|========================================== | 64%
|
|========================================== | 65%
|
|=========================================== | 65%
|
|=========================================== | 66%
|
|=========================================== | 67%
|
|============================================ | 67%
|
|============================================ | 68%
|
|============================================= | 68%
|
|============================================= | 69%
|
|============================================= | 70%
|
|============================================== | 70%
|
|============================================== | 71%
|
|============================================== | 72%
|
|=============================================== | 72%
|
|=============================================== | 73%
|
|================================================ | 73%
|
|================================================ | 74%
|
|================================================ | 75%
|
|================================================= | 75%
|
|================================================= | 76%
|
|================================================== | 76%
|
|================================================== | 77%
|
|================================================== | 78%
|
|=================================================== | 78%
|
|=================================================== | 79%
|
|==================================================== | 79%
|
|==================================================== | 80%
|
|==================================================== | 81%
|
|===================================================== | 81%
|
|===================================================== | 82%
|
|====================================================== | 82%
|
|====================================================== | 83%
|
|====================================================== | 84%
|
|======================================================= | 84%
|
|======================================================= | 85%
|
|======================================================== | 85%
|
|======================================================== | 86%
|
|======================================================== | 87%
|
|========================================================= | 87%
|
|========================================================= | 88%
|
|========================================================== | 88%
|
|========================================================== | 89%
|
|========================================================== | 90%
|
|=========================================================== | 90%
|
|=========================================================== | 91%
|
|=========================================================== | 92%
|
|============================================================ | 92%
|
|============================================================ | 93%
|
|============================================================= | 93%
|
|============================================================= | 94%
|
|============================================================= | 95%
|
|============================================================== | 95%
|
|============================================================== | 96%
|
|=============================================================== | 96%
|
|=============================================================== | 97%
|
|=============================================================== | 98%
|
|================================================================ | 98%
|
|================================================================ | 99%
|
|=================================================================| 99%
|
|=================================================================| 100%
health_insurance <- health_insurance %>%
mutate(fips = parse_integer(Geo_FIPS))
t2_county <- t2_county %>%
mutate(fips = parse_integer(GEOID))
comb_data2 <- t2_county %>%
left_join(health_insurance, by = "fips")
comb_data_sub2 <- subset(comb_data2, STATEFP != "02") %>%
subset(STATEFP != "02") %>%
subset(STATEFP != "15") %>%
subset(STATEFP != "60") %>%
subset(STATEFP != "66") %>%
subset(STATEFP != "69") %>%
subset(STATEFP != "72") %>%
subset(STATEFP != "78")
tm_shape(comb_data_sub2, projection = 2163) + tm_polygons("SE_T006_003")
tm_shape(comb_data_sub2) + tm_polygons("SE_T006_003") + tm_shape(us_states) + tm_borders(lwd = .36, col = "black", alpha = 1)
tm_shape(comb_data_sub2) + tm_polygons("SE_T006_003", border.col = "grey", border.alpha = .4) + tm_shape(us_states) + tm_borders(lwd = .36, col = "black", alpha = 1)
The command “cb = TRUE” is used to make the resolution of map 1:500k. However, if “cb=FALSE” is used, then the default resolution would give the most detailed image. Therefore, the “cb = TRUE” command makes the resolution of the maps better fitted for display instead of having the resolution become too detailed.