WEO %>%
time_to_date %>%
left_join(REF_AREA, by = "REF_AREA") %>%
filter(CONCEPT == "NGAP_NPGDP",
Ref_area %in% c("Italy", "France", "Greece", "Spain", "Germany"),
date >= as.Date("2000-01-01")) %>%
ggplot() +
geom_line(aes(x = date, y = OBS_VALUE/100, color = Ref_area)) +
scale_color_manual(values = c("#ED2939", "#000000", "#0D5EAF", "#009246", "#FFC400")) +
theme_minimal() +
scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
geom_image(data = . %>%
filter(date == as.Date("2014-01-01")) %>%
mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", Ref_area)), ".png")),
aes(x = date, y = OBS_VALUE/100, image = image), asp = 1.5) +
theme(legend.position = c(0.15, 0.2),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-90, 90, 2),
labels = percent_format(accuracy = 1)) +
ylab("Output Gap (% of Potential Output)") + xlab("")