ce.series |>
filter(industry_code %in% c(6000000, 7000000, 5000000, 8000000),
data_type_code == 3,
seasonal == "S") |>
left_join(`ce.data.0.AllCESSeries`, by = "series_id") |>
left_join(ce.industry, by = "industry_code") |>
month_to_date() |>
mutate(wage_inflation = (value/lag(value, 12) - 1)) |>
filter(date >= as.Date("2008-01-01")) |>
ggplot() + ylab("Nominal Wage Inflation") + xlab("") + theme_minimal() +
geom_line(aes(x = date, y = wage_inflation, color = industry_name)) +
theme(legend.title = element_blank(),
legend.position = c(0.4, 0.9)) +
scale_y_continuous(breaks = seq(-0.2, 0.4, 0.01),
labels = percent_format(acc = 1)) +
scale_x_date(breaks = as.Date(paste0(seq(1940, 2022, 2), "-01-01")),
labels = date_format("%Y")) +
scale_color_manual(values = viridis(4)[1:3]) +
geom_hline(yintercept = 0, linetype = "dashed")