Not to be submitted
The Local Area Unemployment Statistics page from the Bureau of Labor Statistics makes available county-level monthly unemployment data for a 14-month window. The file for December 2024 through January 2026 is available is available as an Excel file at https://stat.uiowa.edu/~luke/data/laus/laucntycur14-2025.xlsx.
One way to read the data into R is:
laus14file <- "laucntycur14-2025.xlsx"
if (! file.exists(laus14file)) {
laus14URL <- paste0("http://www.stat.uiowa.edu/~luke/data/laus/",
laus14file)
download.file(laus14URL, laus14file, mode = "wb")
}
lausUS <- readxl::read_xlsx(laus14file, skip = 2)
lausUS <- lausUS[1:(nrow(lausUS) - 2),]
names(lausUS) <- c("LAUSAreaCode", "State", "County",
"Title", "Period",
"LaborForce", "Employed",
"Unemployed", "UnempRate")
lausUS$Period <- substr(lausUS$Period, 1, 6)
In these problems you will be working with this unemployment data. For each of the following problems
describe any interesting features your plots reveal;
choose an appropriate color palette and explain your palette choice.
Create a choropleth map of the average state unemployment rates over the period covered by the data. In computing the averages keep in mind that the workforce sizes differ across counties.
Hint: The State variable in the lausUS data
frame is the state FIPS code. The state.fips data frame in
the maps package can be used to map state names to FIPS
codes. One possible approach to attaching state FIPS codes to the map
data needed for ggplot:
state.fips <-
select(maps::state.fips, fips, region = polyname) |>
mutate(region = sub(":.*", "", region)) |>
unique()
gusa <- left_join(gusa, state.fips, "region")
For the months of March, June, September, and December of 2025 create a choropleth map of the Iowa county unemployment rates for each of these months in a faceted display.
Hint: The County column of the lausUS data
frame contains the county portions of the county FIPS codes. The full
county FIPS codes can be computed as
with(lausUS, 1000 * State + County)
Create a choropleth map of the difference between the Iowa county unemployment rates in January 2025 and December 2025.
Create a Shiny app that allows animating through the monthly choropleth maps of county level Iowa unemployment rates. Are there any other interactive features that might be useful? These files are a possible starting point.