About the Data

I am using county level unemployment data for each state, made possible by the USDA.

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.

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

Importing & Cleaning the Data

options(tigris_class = "sf")
countyMap=counties(cb = TRUE  )

countyData=read.csv("/Users/gregmaghakian/Documents/Soc 712/Week 10 Mapping/Unemployment.csv")
countyData=countyData%>%
  rename("GEOID"="FIPStxt")
countyData$GEOID=parse_integer(countyData$GEOID)
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

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"))

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 a more overall and concise 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.

However, like mentioned before, we miss out on state rates and county level information.

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.

Let’s look at the change rate to better understand this effect.

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)

Looking at the change in the unemployment rate once again paints a different picture. This provides a better and more concise visual for what is happening with the unemployment rate in the US. While Trump’s presidency seems to be having a positive economic effect on national unemployment levels, some states just aren’t benefiting from his policies.

Let’s take a closer look at some of these states.

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 same 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!

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 what the rest of the country is experiencing–lower unemployment rates in 2017. Yet, Big Horn County experiences the highest unemployment rate increase in the Country, hinting at a tight labor market in that area.

Discussion

While our non-spatial density visualizations show a decreasing and more centralized 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 rate gains that neighboring states are getting. This insight is what we gain 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.

Moving forward, it would be smart to try and target these more problematic areas in order to equalize the unemployment rate across the country–from a political and socio-economic viewpoint.

Side-Note:

Changing cb to FALSE from TRUE in the counties function in the tigris package seems to change the resolution and detailing of the map itself. In the example below, when specifying cb=FALSE, we get a lower detailed map. It is easy to see when looking at Suffolk County–comparing it to the Suffolk County specified in the report above when cb=TRUE

An example:

countyMap=counties(cb = FALSE  )

countyData=read.csv("/Users/gregmaghakian/Documents/Soc 712/Week 10 Mapping/Unemployment.csv")
countyData=countyData%>%
  rename("GEOID"="FIPStxt")
countyData$GEOID=parse_integer(countyData$GEOID)
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")

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


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)