wage |>
filter(variable == "M0872BUSM234NNBR",
date >= as.Date("1928-01-01")) |>
ggplot() +
geom_line(aes(x = date, y = value)) +
ylab("Wages") + xlab("") +
geom_rect(data = nber_recessions,
aes(xmin = Peak, xmax = Trough, ymin = -Inf, ymax = +Inf),
fill = viridis(3)[3], alpha = 0.1) +
scale_y_continuous(breaks = seq(90, 110, 2.5),
limits = c(92.5, 110)) +
scale_x_date(breaks = as.Date(paste0(seq(1928, 1935, 1), "-01-01")),
labels = date_format("%Y"),
limits = c(as.Date("1928-01-01"), as.Date("1935-07-01"))) +
theme_minimal() +
geom_vline(xintercept = as.Date("1929-10-29"), linetype = "dashed", color = viridis(3)[1]) +
geom_vline(xintercept = as.Date("1933-04-01"), linetype = "dashed", color = viridis(3)[2])