NE.EXP.GNFS.ZS |>
year_to_enddate() |>
filter(iso2c %in% c("ID", "KR", "MY", "TH"),
date <= as.Date("2002-01-01"),
date >= as.Date("1992-01-01")) |>
left_join(iso2c, by = "iso2c") |>
mutate(value = value/100) |>
add_flag_color("Iso2c") |>
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.8)) +
scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-60, 60, 2),
labels = scales::percent_format(accuracy = 1)) +
xlab("") + ylab("Exports of goods and services (% of GDP)")