EO %>%
filter(LOCATION %in% c("FRA", "DEU", "ITA")) %>%
left_join(EO_var$LOCATION, by = "LOCATION") %>%
year_to_date %>%
ggplot() + theme_minimal() + ylab("NAIRU, OECD (% of GDP)") + xlab("") +
geom_line(aes(x = date, y = obsValue/100, color = Location)) +
geom_image(data = . %>%
filter(date == as.Date("2017-01-01")) %>%
mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", Location)), ".png")),
aes(x = date, y = obsValue/100, image = image), asp = 1.5) +
scale_color_manual(values = c("#0055a4", "#000000", "#008c45")) +
scale_x_date(breaks = seq(1920, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.15, 0.2),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-7, 60, 1),
labels = scales::percent_format(accuracy = 1))