Connecting unemployment rates

AE 04

Setup

Data

unemp_bachelor <- read_csv("data/fred/CGBD25O.csv") |>
  rename(date = observation_date, unemp_rate = CGBD25O) |>
  mutate(degree = "Bachelor's")
unemp_master <- read_csv("data/fred/CGMD25O.csv") |>
  rename(date = observation_date, unemp_rate = CGMD25O) |>
  mutate(degree = "Master's")
unemp_doctoral <- read_csv("data/fred/CGDD25O.csv") |>
  rename(date = observation_date, unemp_rate = CGDD25O) |>
  mutate(degree = "Doctoral")
unemp <- bind_rows(unemp_bachelor, unemp_master, unemp_doctoral) |>
  mutate(degree = fct_relevel(degree, "Bachelor's", "Master's", "Doctoral"))

Start with the unemp data for the application exercise:

unemp
# A tibble: 936 × 3
   date       unemp_rate degree    
   <date>          <dbl> <fct>     
 1 2000-01-01        2.1 Bachelor's
 2 2000-02-01        1.8 Bachelor's
 3 2000-03-01        1.7 Bachelor's
 4 2000-04-01        1.5 Bachelor's
 5 2000-05-01        1.7 Bachelor's
 6 2000-06-01        1.8 Bachelor's
 7 2000-07-01        1.9 Bachelor's
 8 2000-08-01        2.3 Bachelor's
 9 2000-09-01        2   Bachelor's
10 2000-10-01        1.6 Bachelor's
# ℹ 926 more rows

Plot

And recreate the connected scatter plot from the slides.

The following inputs will be helpful as you build the plot.

recession_end_dates <- c(
  ymd("2001-11-01"),
  ymd("2009-06-01"),
  ymd("2020-04-01")
)
endpoints <- c(
  ymd("2000-01-01"),
  ymd("2025-12-01")
)
gray_dark_hex <- "#595959"
gray_light_hex <- "#737373"
# plot code goes here