Research Question

How does health insurance vary across the five NYC boroughs? OVer 600,000 New York City residents currently do not hold health insurance. It is important to assess which borough has the highest rate of uninsured residents and determine if there is a correlation between lack of health insurance and low educational attainment or other potential factors.

Data Collection & Methods of Analysis

The dataset used in this research is the American Community Survey 2013 - 2017(5-Years Estimate) downloaded from Social Explorer.

Import Data

library(readr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
hw2data <-read_csv("C:/Users/Matthew/Documents/R12022665_SL060.csv")
## Parsed with column specification:
## cols(
##   .default = col_character()
## )
## See spec(...) for full column specifications.
View(hw2data)
head(hw2data)
## # A tibble: 6 x 92
##   FIPS  `Name of Area` `Qualifying Nam~ `State/U.S.-Abb~ `Summary Level`
##   <chr> <chr>          <chr>            <chr>            <chr>          
## 1 Geo_~ Geo_NAME       Geo_QName        Geo_STUSAB       Geo_SUMLEV     
## 2 3600~ Bronx borough~ Bronx borough, ~ ny               060            
## 3 3604~ Brooklyn boro~ Brooklyn boroug~ ny               060            
## 4 3606~ Manhattan bor~ Manhattan borou~ ny               060            
## 5 3608~ Queens boroug~ Queens borough,~ ny               060            
## 6 3608~ Staten Island~ Staten Island b~ ny               060            
## # ... with 87 more variables: `Geographic Component` <chr>, `File
## #   Identification` <chr>, `Logical Record Number` <chr>, US <chr>,
## #   Region <chr>, Division <chr>, `State (Census Code)` <chr>, `State
## #   (FIPS)` <chr>, County <chr>, `County Subdivision (FIPS)` <chr>, `Place
## #   (FIPS Code)` <chr>, `Place (State FIPS + Place FIPS)` <chr>, `Census
## #   Tract` <chr>, `Block Group` <chr>, `Consolidated City` <chr>,
## #   `American Indian Area/Alaska Native Area/Hawaiian Home Land
## #   (Census)` <chr>, `American Indian Area/Alaska Native Area/Hawaiian
## #   Home Land (FIPS)` <chr>, `American Indian Trust Land/Hawaiian Home
## #   Land Indicator` <chr>, `American Indian Tribal Subdivision
## #   (Census)` <chr>, `American Indian Tribal Subdivision (FIPS)` <chr>,
## #   `Alaska Native Regional Corporation (FIPS)` <chr>, `Metropolitan and
## #   Micropolitan Statistical Area` <chr>, `Combined Statistical
## #   Area` <chr>, `Metropolitan Division` <chr>, `Metropolitan Area Central
## #   City` <chr>, `Metropolitan/Micropolitan Indicator Flag` <chr>, `New
## #   England City and Town Combined Statistical Area` <chr>, `New England
## #   City and Town Area` <chr>, `New England City and Town Area
## #   Division` <chr>, `Urban Area` <chr>, `Urban Area Central Place` <chr>,
## #   `Current Congressional District ***` <chr>, `State Legislative
## #   District Upper` <chr>, `State Legislative District Lower` <chr>,
## #   `Voting District` <chr>, `ZIP Code Tabulation Area (3-digit)` <chr>,
## #   `ZIP Code Tabulation Area (5-digit)` <chr>, `Subbarrio (FIPS)` <chr>,
## #   `School District (Elementary)` <chr>, `School District
## #   (Secondary)` <chr>, `School District (Unified)` <chr>,
## #   `Urban/Rural` <chr>, `Principal City Indicator` <chr>, `Traffic
## #   Analysis Zone` <chr>, `Urban Growth Area` <chr>, `Public Use Microdata
## #   Area - 5% File` <chr>, `Public Use Microdata Area - 1% File` <chr>,
## #   `Geographic Identifier` <chr>, `Tribal Tract` <chr>, `Tribal Block
## #   Group` <chr>, `Area (Land)` <chr>, `Area (Water)` <chr>, `Population
## #   15 Years and Over:` <chr>, `Population 15 Years and Over: Never
## #   Married` <chr>, `Population 15 Years and Over: Now Married (Not
## #   Including Separated)` <chr>, `Population 15 Years and Over:
## #   Separated` <chr>, `Population 15 Years and Over: Widowed` <chr>,
## #   `Population 15 Years and Over: Divorced` <chr>, `Population 25 Years
## #   and Over:` <chr>, `Population 25 Years and Over: Less than High
## #   School` <chr>, `Population 25 Years and Over: High School Graduate
## #   (Includes Equivalency)` <chr>, `Population 25 Years and Over: Some
## #   College` <chr>, `Population 25 Years and Over: Bachelor's
## #   Degree` <chr>, `Population 25 Years and Over: Master's Degree` <chr>,
## #   `Population 25 Years and Over: Professional School Degree` <chr>,
## #   `Population 25 Years and Over: Doctorate Degree` <chr>, `Male
## #   Population 25 Years and Over:` <chr>, `Male Population 25 Years and
## #   Over: Less than High School` <chr>, `Male Population 25 Years and
## #   Over: High School Graduate (Includes Equivalency)` <chr>, `Male
## #   Population 25 Years and Over: Some College` <chr>, `Male Population 25
## #   Years and Over: Bachelor's Degree` <chr>, `Male Population 25 Years
## #   and Over: Master's Degree` <chr>, `Male Population 25 Years and Over:
## #   Professional School Degree` <chr>, `Male Population 25 Years and Over:
## #   Doctorate Degree` <chr>, `Female Population 25 Years and Over:` <chr>,
## #   `Female Population 25 Years and Over: Less than High School` <chr>,
## #   `Female Population 25 Years and Over: High School Graduate (Includes
## #   Equivalency)` <chr>, `Female Population 25 Years and Over: Some
## #   College` <chr>, `Female Population 25 Years and Over: Bachelor's
## #   Degree` <chr>, `Female Population 25 Years and Over: Master's
## #   Degree` <chr>, `Female Population 25 Years and Over: Professional
## #   School Degree` <chr>, `Female Population 25 Years and Over: Doctorate
## #   Degree` <chr>, `Total:` <chr>, `Total: No Health Insurance
## #   Coverage` <chr>, `Total: with Health Insurance Coverage` <chr>,
## #   `Total: with Health Insurance Coverage: Public Health Coverage` <chr>,
## #   `Total: with Health Insurance Coverage: Private Health
## #   Insurance` <chr>

List of Variable Names

names(hw2data)
##  [1] "FIPS"                                                                            
##  [2] "Name of Area"                                                                    
##  [3] "Qualifying Name"                                                                 
##  [4] "State/U.S.-Abbreviation (USPS)"                                                  
##  [5] "Summary Level"                                                                   
##  [6] "Geographic Component"                                                            
##  [7] "File Identification"                                                             
##  [8] "Logical Record Number"                                                           
##  [9] "US"                                                                              
## [10] "Region"                                                                          
## [11] "Division"                                                                        
## [12] "State (Census Code)"                                                             
## [13] "State (FIPS)"                                                                    
## [14] "County"                                                                          
## [15] "County Subdivision (FIPS)"                                                       
## [16] "Place (FIPS Code)"                                                               
## [17] "Place (State FIPS + Place FIPS)"                                                 
## [18] "Census Tract"                                                                    
## [19] "Block Group"                                                                     
## [20] "Consolidated City"                                                               
## [21] "American Indian Area/Alaska Native Area/Hawaiian Home Land (Census)"             
## [22] "American Indian Area/Alaska Native Area/Hawaiian Home Land (FIPS)"               
## [23] "American Indian Trust Land/Hawaiian Home Land Indicator"                         
## [24] "American Indian Tribal Subdivision (Census)"                                     
## [25] "American Indian Tribal Subdivision (FIPS)"                                       
## [26] "Alaska Native Regional Corporation (FIPS)"                                       
## [27] "Metropolitan and Micropolitan Statistical Area"                                  
## [28] "Combined Statistical Area"                                                       
## [29] "Metropolitan Division"                                                           
## [30] "Metropolitan Area Central City"                                                  
## [31] "Metropolitan/Micropolitan Indicator Flag"                                        
## [32] "New England City and Town Combined Statistical Area"                             
## [33] "New England City and Town Area"                                                  
## [34] "New England City and Town Area Division"                                         
## [35] "Urban Area"                                                                      
## [36] "Urban Area Central Place"                                                        
## [37] "Current Congressional District ***"                                              
## [38] "State Legislative District Upper"                                                
## [39] "State Legislative District Lower"                                                
## [40] "Voting District"                                                                 
## [41] "ZIP Code Tabulation Area (3-digit)"                                              
## [42] "ZIP Code Tabulation Area (5-digit)"                                              
## [43] "Subbarrio (FIPS)"                                                                
## [44] "School District (Elementary)"                                                    
## [45] "School District (Secondary)"                                                     
## [46] "School District (Unified)"                                                       
## [47] "Urban/Rural"                                                                     
## [48] "Principal City Indicator"                                                        
## [49] "Traffic Analysis Zone"                                                           
## [50] "Urban Growth Area"                                                               
## [51] "Public Use Microdata Area - 5% File"                                             
## [52] "Public Use Microdata Area - 1% File"                                             
## [53] "Geographic Identifier"                                                           
## [54] "Tribal Tract"                                                                    
## [55] "Tribal Block Group"                                                              
## [56] "Area (Land)"                                                                     
## [57] "Area (Water)"                                                                    
## [58] "Population 15 Years and Over:"                                                   
## [59] "Population 15 Years and Over: Never Married"                                     
## [60] "Population 15 Years and Over: Now Married (Not Including Separated)"             
## [61] "Population 15 Years and Over: Separated"                                         
## [62] "Population 15 Years and Over: Widowed"                                           
## [63] "Population 15 Years and Over: Divorced"                                          
## [64] "Population 25 Years and Over:"                                                   
## [65] "Population 25 Years and Over: Less than High School"                             
## [66] "Population 25 Years and Over: High School Graduate (Includes Equivalency)"       
## [67] "Population 25 Years and Over: Some College"                                      
## [68] "Population 25 Years and Over: Bachelor's Degree"                                 
## [69] "Population 25 Years and Over: Master's Degree"                                   
## [70] "Population 25 Years and Over: Professional School Degree"                        
## [71] "Population 25 Years and Over: Doctorate Degree"                                  
## [72] "Male Population 25 Years and Over:"                                              
## [73] "Male Population 25 Years and Over: Less than High School"                        
## [74] "Male Population 25 Years and Over: High School Graduate (Includes Equivalency)"  
## [75] "Male Population 25 Years and Over: Some College"                                 
## [76] "Male Population 25 Years and Over: Bachelor's Degree"                            
## [77] "Male Population 25 Years and Over: Master's Degree"                              
## [78] "Male Population 25 Years and Over: Professional School Degree"                   
## [79] "Male Population 25 Years and Over: Doctorate Degree"                             
## [80] "Female Population 25 Years and Over:"                                            
## [81] "Female Population 25 Years and Over: Less than High School"                      
## [82] "Female Population 25 Years and Over: High School Graduate (Includes Equivalency)"
## [83] "Female Population 25 Years and Over: Some College"                               
## [84] "Female Population 25 Years and Over: Bachelor's Degree"                          
## [85] "Female Population 25 Years and Over: Master's Degree"                            
## [86] "Female Population 25 Years and Over: Professional School Degree"                 
## [87] "Female Population 25 Years and Over: Doctorate Degree"                           
## [88] "Total:"                                                                          
## [89] "Total: No Health Insurance Coverage"                                             
## [90] "Total: with Health Insurance Coverage"                                           
## [91] "Total: with Health Insurance Coverage: Public Health Coverage"                   
## [92] "Total: with Health Insurance Coverage: Private Health Insurance"

Renaming Variables

hw2data2 <-rename(hw2data, Borough= `Name of Area`, No_HI= `Total: No Health Insurance Coverage`, Yes_HI= `Total: with Health Insurance Coverage`, Less_than_HS= `Population 25 Years and Over: Less than High School`, High_School= `Population 25 Years and Over: High School Graduate (Includes Equivalency)`, Some_College= `Population 25 Years and Over: Some College`, Bachelor= `Population 25 Years and Over: Bachelor's Degree`, Master= `Population 25 Years and Over: Master's Degree`, Professional= `Population 25 Years and Over: Professional School Degree`, Doctorate= `Population 25 Years and Over: Doctorate Degree`)

Selecting Variables

hw2data3 <- select(hw2data2, Borough, No_HI, Yes_HI, Less_than_HS, High_School, Some_College, Bachelor, Master, Professional, Doctorate)

print (hw2data3)
## # A tibble: 6 x 10
##   Borough No_HI Yes_HI Less_than_HS High_School Some_College Bachelor
##   <chr>   <chr> <chr>  <chr>        <chr>       <chr>        <chr>   
## 1 Geo_NA~ SE_T~ SE_T1~ SE_T025_002  SE_T025_003 SE_T025_004  SE_T025~
## 2 Bronx ~ 1589~ 12754~ 264309       256066      227450       115670  
## 3 Brookl~ 2501~ 23732~ 345445       460338      354282       380135  
## 4 Manhat~ 1096~ 15336~ 166091       156607      172290       397987  
## 5 Queens~ 2843~ 20399~ 314557       461228      376485       325374  
## 6 Staten~ 27933 444022 37040        103011      82970        62620   
## # ... with 3 more variables: Master <chr>, Professional <chr>,
## #   Doctorate <chr>
dim (hw2data3)
## [1]  6 10

Summarizing Variables

by_borough<-group_by(hw2data3, Borough)
hw2data4<-summarize(by_borough, Borough_NoHI=sum(as.numeric(No_HI),na.rm=TRUE))
## Warning in evalq(sum(as.numeric(No_HI), na.rm = TRUE), <environment>): NAs
## introduced by coercion
print(hw2data4)
## # A tibble: 6 x 2
##   Borough                                          Borough_NoHI
##   <chr>                                                   <dbl>
## 1 Bronx borough, Bronx County, New York                  158959
## 2 Brooklyn borough, Kings County, New York               250133
## 3 Geo_NAME                                                    0
## 4 Manhattan borough, New York County, New York           109614
## 5 Queens borough, Queens County, New York                284341
## 6 Staten Island borough, Richmond County, New York        27933
hw2data4<-summarize(by_borough, Borough_YesHI=sum(as.numeric(Yes_HI),na.rm=TRUE))
## Warning in evalq(sum(as.numeric(Yes_HI), na.rm = TRUE), <environment>): NAs
## introduced by coercion
print(hw2data4)
## # A tibble: 6 x 2
##   Borough                                          Borough_YesHI
##   <chr>                                                    <dbl>
## 1 Bronx borough, Bronx County, New York                  1275463
## 2 Brooklyn borough, Kings County, New York               2373217
## 3 Geo_NAME                                                     0
## 4 Manhattan borough, New York County, New York           1533614
## 5 Queens borough, Queens County, New York                2039939
## 6 Staten Island borough, Richmond County, New York        444022

Results

According to the variable summaries, Queens has the highest rate of uninsured residents and Brooklyn follows close behind (284341 and 250133, respectively). This correlates with prior data in which Queens accounts for 33% of elderly adults are insured. This data would be enhanced with the incorporation of age.