POP_PROJ %>%
filter(LOCATION %in% c("DEU", "FRA", "ITA"),
# D199G5TT - Population (hist&proj) All ages
AGE == "D199G5TT",
# TT - All persons
SEX == "TT") %>%
left_join(POP_PROJ_var$LOCATION %>%
setNames(c("LOCATION", "Location")), by = "LOCATION") %>%
year_to_enddate %>%
ggplot() + ylab("Population (hist&proj) All ages") + xlab("") +
geom_line(aes(x = date, y = obsValue/1000, color = Location, linetype = Location)) +
scale_color_manual(values = viridis(4)[1:3]) + theme_minimal() +
theme(legend.position = c(0.7, 0.2),
legend.title = element_blank(),
legend.direction = "horizontal") +
scale_x_date(breaks = seq(1920, 3000, 10) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 3000, 5),
labels = dollar_format(prefix = "", suffix = " M"))