NY.ADJ.DKAP.GN.ZS %>%
filter(iso2c %in% c("AR", "CL", "VE")) %>%
left_join(iso2c, by = "iso2c") %>%
year_to_enddate %>%
mutate(Iso2c = ifelse(iso2c == "VE", "Venezuela", Iso2c)) %>%
mutate(value = value/100) %>%
left_join(colors, by = c("Iso2c" = "country")) %>%
ggplot(.) +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
theme(legend.title = element_blank(),
legend.position = c(0.2, 0.9)) +
scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-60, 60, 1),
labels = scales::percent_format(accuracy = 1)) +
xlab("") + ylab("Manufacturing, value added (% of GDP)")