nasa_10_f_bs %>%
filter(geo %in% c("FR", "DE"),
sector %in% c("S11", "S12", "S13", "S14_S15"),
co_nco == "CO",
na_item == "BF90",
unit == "PC_GDP") %>%
left_join(geo, by = "geo") %>%
mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
left_join(sector, by = "sector") %>%
year_to_date %>%
mutate(values = values/100) %>%
ggplot(.) + geom_line(aes(x = date, y = values, color = Geo, linetype = Sector)) +
theme_minimal() + xlab("") + ylab("% du PIB") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
add_flags +
geom_image(data = tibble(date = rep(as.Date("2020-01-01"), 6),
value = c(1.6, 0.1, -0.2, -0.5, -0.75, -.95),
image = c("../../icon/sector/vsmall/S14_S15.png",
"../../icon/sector/vsmall/S12.png",
"../../icon/sector/vsmall/S13.png",
"../../icon/sector/vsmall/S11.png",
"../../icon/sector/vsmall/S13.png",
"../../icon/sector/vsmall/S11.png")),
aes(x = date, y = value, image = image), asp = 1.5) +
scale_color_manual(values = c("#0055a4", "#000000")) +
scale_y_continuous(breaks = 0.01*seq(-200, 200, 20),
labels = percent_format()) +
theme(legend.position = "none")