Last month I ran my first webinar (“Make a Census Explorer with Shiny”). About 100 people showed up, and feedback from the participants was great. I also had a lot of fun myself. Because of this, I’ve decided to do one more webinar before my free trial with the webinar service ends. Here are the details:
Title: Map US Unemployment Data with R, Choroplethr and Shiny
When: Thursday, November 19 12:00 PM – 1:00 PM PST
Agenda: In this free webinar I will explain:
-How US Unemployment data is measured and disseminated
-How to access the data in R
-How to map the data in R
-How to map the data with Shiny
-Q&A
Click here to register for the webinar.
Space is limited, so I recommend that you sign up soon to reserve your seat.
Example Analysis Using Unemployment Data
The following code generates a boxplot of US State Unemployment data. Note the dramatic jump between 2008 and 2009.
[code lang=”r”]
library(rUnemploymentData)
data(df_state_unemployment)
boxplot(df_state_unemployment[, 2:ncol(df_state_unemployment)],
main = "US State Unemployment Rates",
xlab = "Year",
ylab = "Percent Unemployment")
[/code]
The boxplot tells us that unemployment rates in US States jumped dramatically between 2008 and 2009. However, it does not tell us how individual states were effected. To do this we can calculate the percent change between the years and create a choropleth map:
[code lang=”r”]
library(choroplethr)
library(choroplethrMaps)
df_state_unemployment$value = (df_state_unemployment$"2009" – df_state_unemployment$"2008") / df_state_unemployment$"2008" * 100
state_choropleth(df_state_unemployment,
title = "Percent Change in US State Unemployment\n2008-2009",
legend = "% Change",
num_colors = 1)
[/code]
Here we can see that Utah had the largest jump in unemployment between 2008 and 2009.