UNE_DEAP_SEX_AGE_RT_A |>
filter(ref_area %in% c("HKG"),
sex == "SEX_T",
classif1 == "AGE_AGGREGATE_YGE15") |>
mutate(date = paste0(time, "-12-31") |> as.Date()) |>
select(date, value = obs_value) |>
mutate(variable = "Unemployment Rate") |>
bind_rows(NY.GDP.DEFL.KD.ZG |>
filter(iso2c %in% c("HK")) |>
mutate(date = paste0(year, "-12-31") |> as.Date()) |>
select(date, value = value) |>
mutate(variable = "Inflation (GDP Deflator)")) |>
ggplot() + geom_line() + theme_minimal() +
aes(x = date, y = value/100, color = variable, linetype = variable) +
xlab("") + ylab("Hong Kong's Inflation or Unemployment") +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.title = element_blank(),
legend.position = c(0.85, 0.85)) +
scale_x_date(breaks = seq(1900, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
labels = percent_format(a = 1)) +
geom_vline(xintercept = as.Date("1983-01-01"), linetype = "dashed", color = viridis(4)[3]) +
geom_hline(yintercept = 0, linetype = "dashed", color = "black")