Introduction

This project is about the unemployment rate during Trump Gorvernment.

Trump’s slogan and signature catch-phrase has always been “Make America Great Again”. One way Trump proposed to do this was through economic stimulation of American businesses and companies, creating jobs here in the United States.

Literature Review

The research literature shows a strong association between unemployment and ill health. Some illness is caused by unemployment whilst other health problems are exacerbated by unemployment ( Smith, 1987; Mathers & Schofield,1998). An Australian summary of the health and unemployment literature by Mathers and Schofield (1998) identified that unemployment has detrimental effects on mental health, physical health and health related behaviours.

The evidence that unemployment has negative effects on mental health is strong. Mental health effects on young unemployed people include low self esteem and confidence ( Gurney, 1980; Prause and Dooley, 1997), increased incidence of depression ( Patton and Noller, 1990; Winefield et al, 1993; West & Sweeting, 1996), stress related symptoms ( Hammarstrom, 1994) and higher levels of anxiety ( Morrell et al, 1994; West & Sweeting,1996). In their study, Morrell et al (1998) find a strong association between unemployment in young 15 to 25 year olds and youth suicide.

The imppact is not only in the health, but also the family. In the article Unemployment and Families: A Review of Research (Ström, 2003), it offers a broad review of research on the consequences of unemployment for families. It discusses empirical studies of the spouses and the children of unemployed individuals. Although there are some dissenting voices, most studies focusing on unemployment and families suggest that unemployed individuals and their families are exposed to many adverse events and circumstances. However, it is not yet clear what role unemployment plays in this, and what is the significance of related factors.

Data

We look to analyze the effectiveness of his policy remarks through carefully looking at unemployment levels from 2016 to 2017.

Importing the map file

library(tidyverse)
## ── Attaching packages ────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.1.1       ✔ purrr   0.3.0  
## ✔ tibble  2.0.1       ✔ dplyr   0.8.0.1
## ✔ tidyr   0.8.2       ✔ stringr 1.3.1  
## ✔ readr   1.3.1       ✔ forcats 0.3.0
## ── Conflicts ───────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(sf)
## Linking to GEOS 3.6.1, GDAL 2.1.3, PROJ 4.9.3
library(tmap)
library(tigris)
## To enable 
## caching of data, set `options(tigris_use_cache = TRUE)` in your R script or .Rprofile.
## 
## Attaching package: 'tigris'
## The following object is masked from 'package:graphics':
## 
##     plot
library(spdep)
## Loading required package: sp
## Loading required package: spData
## To access larger datasets in this package, install the spDataLarge
## package with: `install.packages('spDataLarge',
## repos='https://nowosad.github.io/drat/', type='source')`
library(tmaptools)
library(dplyr)
library(tidyr)
library(readr)


options(tigris_use_cache = TRUE)
options(tigris_progress_bar = FALSE)
options(tidycensus_progress_ba = FALSE)

countyMap <- st_read('/Users/Jessica/rsconnect/documents/tl_2016_us_county-5/tl_2016_us_county.shp', stringsAsFactors = FALSE)
## Reading layer `tl_2016_us_county' from data source `/Users/Jessica/rsconnect/documents/tl_2016_us_county-5/tl_2016_us_county.shp' using driver `ESRI Shapefile'
## Simple feature collection with 3233 features and 17 fields
## geometry type:  MULTIPOLYGON
## dimension:      XY
## bbox:           xmin: -179.2311 ymin: -14.60181 xmax: 179.8597 ymax: 71.44106
## epsg (SRID):    4269
## proj4string:    +proj=longlat +datum=NAD83 +no_defs
names(countyMap)
##  [1] "STATEFP"  "COUNTYFP" "COUNTYNS" "GEOID"    "NAME"     "NAMELSAD"
##  [7] "LSAD"     "CLASSFP"  "MTFCC"    "CSAFP"    "CBSAFP"   "METDIVFP"
## [13] "FUNCSTAT" "ALAND"    "AWATER"   "INTPTLAT" "INTPTLON" "geometry"

Importing data file

countyData <- read.csv("/Users/Jessica/Desktop/unemployment.csv", stringsAsFactors = FALSE)
names(countyData)
##  [1] "FIPStxt"                                  
##  [2] "State"                                    
##  [3] "Area_name"                                
##  [4] "Rural_urban_continuum_code_2013"          
##  [5] "Urban_influence_code_2013"                
##  [6] "Metro_2013"                               
##  [7] "Civilian_labor_force_2007"                
##  [8] "Employed_2007"                            
##  [9] "Unemployed_2007"                          
## [10] "Unemployment_rate_2007"                   
## [11] "Civilian_labor_force_2008"                
## [12] "Employed_2008"                            
## [13] "Unemployed_2008"                          
## [14] "Unemployment_rate_2008"                   
## [15] "Civilian_labor_force_2009"                
## [16] "Employed_2009"                            
## [17] "Unemployed_2009"                          
## [18] "Unemployment_rate_2009"                   
## [19] "Civilian_labor_force_2010"                
## [20] "Employed_2010"                            
## [21] "Unemployed_2010"                          
## [22] "Unemployment_rate_2010"                   
## [23] "Civilian_labor_force_2011"                
## [24] "Employed_2011"                            
## [25] "Unemployed_2011"                          
## [26] "Unemployment_rate_2011"                   
## [27] "Civilian_labor_force_2012"                
## [28] "Employed_2012"                            
## [29] "Unemployed_2012"                          
## [30] "Unemployment_rate_2012"                   
## [31] "Civilian_labor_force_2013"                
## [32] "Employed_2013"                            
## [33] "Unemployed_2013"                          
## [34] "Unemployment_rate_2013"                   
## [35] "Civilian_labor_force_2014"                
## [36] "Employed_2014"                            
## [37] "Unemployed_2014"                          
## [38] "Unemployment_rate_2014"                   
## [39] "Civilian_labor_force_2015"                
## [40] "Employed_2015"                            
## [41] "Unemployed_2015"                          
## [42] "Unemployment_rate_2015"                   
## [43] "Civilian_labor_force_2016"                
## [44] "Employed_2016"                            
## [45] "Unemployed_2016"                          
## [46] "Unemployment_rate_2016"                   
## [47] "Civilian_labor_force_2017"                
## [48] "Employed_2017"                            
## [49] "Unemployed_2017"                          
## [50] "Unemployment_rate_2017"                   
## [51] "Median_Household_Income_2017"             
## [52] "Med_HH_Income_Percent_of_State_Total_2017"
countyData=countyData%>%
  rename("GEOID"="FIPStxt")

countyMap$GEOID=parse_integer(countyMap$GEOID)
mergedData=left_join(countyMap,countyData,by="GEOID")

USA =mergedData %>%
  filter(STATEFP != "02") %>%
  filter(STATEFP != "15") %>%
  filter(STATEFP != "60") %>%
  filter(STATEFP != "66") %>%
  filter(STATEFP != "69") %>%
  filter(STATEFP != "72") %>%
  filter(STATEFP != "78")

state_border=USA%>%
  aggregate_map(by="STATEFP")

A look at the Unemployment Distribution

library(ggplot2)
library(ggridges)
## 
## Attaching package: 'ggridges'
## The following object is masked from 'package:ggplot2':
## 
##     scale_discrete_manual
library(cowplot)
## 
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggplot2':
## 
##     ggsave
p1=ggplot(USA,aes(x= Unemployment_rate_2016,y=State,fill=State))+geom_density_ridges( rel_min_height = 0.01)+  stat_density_ridges(quantile_lines = TRUE, quantiles = 2)+ guides(fill=guide_legend(title="Region"))+labs(title="Unemployment Rate 2016",subtitle = "By State",x="Unemployment Rate",y="State")


p2=ggplot(USA,aes(x= Unemployment_rate_2017,y=State,fill=State))+geom_density_ridges( rel_min_height = 0.01)+  stat_density_ridges(quantile_lines = TRUE, quantiles = 2)+ guides(fill=guide_legend(title="Region"))+labs(title="Unemployment Rate 2017",subtitle = "By State",x="Unemployment Rate",y="State")

plot_grid(p1,p2,nrow=1,ncol=2,labels=c("Fig. A","Fig. B"))
## Picking joint bandwidth of 0.45
## Picking joint bandwidth of 0.45
## Picking joint bandwidth of 0.38
## Picking joint bandwidth of 0.38

Here we can see the distribution of the unemployment rate by state for 2016 and 2017. We see variation from 2016 to 2017, with some state’s rates decreasing, and some increasing. However, while this is a lot of information, it is hard to differentiate and create an overall picture of the change in unemployment across the states. We would also like to view where specifically the unemployment is concentrated, and changes, in each state.

ggplot(USA,aes(x=Unemployment_rate_2016))+geom_density(fill="lightblue")+geom_density(aes(x=Unemployment_rate_2017),fill="pink",alpha=.4)+labs(title = "Unemployment Rate by Year",x="Unemployment Rate",y="Density")

Pictured above is an overlapped density distribution of the United States’ total employment rate. 2016 is represented in light blue and 2017 is in pink.

Here, we lose out on the state specific detailing, but get an overall picture of the unemployment rate across the two years. It looks like 2016 has higher unemployment rates that are more dispersed, while 2017 has a lower unemployment rate with a larger density clustering at just below 5%. We can visually see how the light blue pushes leftward and upward to create the pink from 2016 to 2017, thus yielding our lower yet more dense rate.

Mapping the Unemployment Rate

tm_shape(USA,projection = 2163)+tm_fill( col=c("Unemployment_rate_2016","Unemployment_rate_2017"),palette="Reds",midpoint=10,border.col = "grey", border.alpha = .3,title=c("Unemployment Rate 2016","Unemployment Rate 2017"))+tm_shape(state_border)+ tm_borders(lwd = .28, col = "black", alpha = 1)+tm_style("classic")+tm_layout(panel.labels=c("2016","2017"),legend.position = c("left","bottom"))

By looking at the map from 2016 to 2017, we notice that the map gets lighter overall, indicating lower overall levels of unemployment. However, by analyzing the maps closely, we notice places that indicate a positive unemployment rate growth from 2016 to 2017.

Unemployment Rate Difference

USA=USA%>%
  group_by(GEOID)%>%
  mutate(URDiff=Unemployment_rate_2017-Unemployment_rate_2016)

tm_shape(USA,projection = 2163)+tm_polygons( 'URDiff',midpoint=0,palette="-RdBu",border.col = "grey", border.alpha = .3,title="Change Rate")+tm_shape(state_border)+ tm_borders(lwd = .28, col = "black", alpha = 1)

New York

NY=filter(USA,STATEFP=="36")
tm_shape(NY)+tm_polygons( 'URDiff',midpoint=0,palette="-RdBu",border.col = "grey", border.alpha = .3,title="Change Rate")+tm_text("NAME",size = "AREA")+tm_shape(state_border)+ tm_borders(lwd = .28, col = "black", alpha = 1)

Here we see while NYC has made improvements in levels of unemployment, virtually all other counties have actually seen slight to no improvements in the unemployment rate. Hamilton county is especially worse off compared to the rest of New York.

South Dakota

SD=filter(USA,STATEFP=="46")
tm_shape(SD)+tm_polygons( 'URDiff',midpoint=0,palette="-RdBu",border.col = "grey", border.alpha = .3,title="Change Rate")+tm_text("NAME",size = "AREA")+tm_shape(state_border)+ tm_borders(lwd = .28, col = "black", alpha = 1)

We view the similar effect happening in South Dakota. From 2016 to 2017, we can obviously see an increase in statewide unemployment rates, which is something not clearly stated through non-spatial visualizations.

Alabama

I chose Alabama is because I spent 4 years over there getting my bachelor degree. Also,from the American Civil War until World War II, Alabama, like many states in the southern U.S., suffered economic hardship. I want to take a look at the unemployment rate in Alabama.

AL=filter(USA,STATEFP=="01")
tm_shape(AL)+tm_polygons( 'URDiff',midpoint=0,palette="-RdBu",border.col = "grey", border.alpha = .3,title="Change Rate")+tm_text("NAME",size = "AREA")+tm_shape(state_border)+ tm_borders(lwd = .28, col = "black", alpha = 1)

Montana

MT=filter(USA,STATEFP=="30")
tm_shape(MT)+tm_polygons( 'URDiff',midpoint=0,palette="-RdBu",border.col = "grey", border.alpha = .3,title="Change Rate")+tm_text("NAME",size = "AREA")+tm_shape(state_border)+ tm_borders(lwd = .28, col = "black", alpha = 1)

Montana offers us a different look at unemployment change. Looking at the map, we can see how most counties are experiencing lower unemployment rates in 2017. However, Big Horn County experiences the highest unemployment rate increase in the Country.

Discussion

While the non-spatial density visualizations show a decreasing unemployment rate, taking a look at the spatial mapping tells a different story.

While the country is trending towards lower unemployment rates, some areas just aren’t progressing as equally as others. Counties in New York, South Dakota, and Montana are not receiving the low unemployment rate gains that neighboring states are getting. Some states like Alabam seems did not experience unemployment. However, it is still suffering economic hardship, which tells us even though the unempployment rate is getting lower, it does not mean the economic environmnet is getting better.

This is what we can get from spatial mapping. This could also be hinting at a flaw in Trump’s economic policies where some states are not favored by his plan and therefore are progressing slower than others at a national level.