NV.IND.TOTL.KD %>%
left_join(iso2c, by = "iso2c") %>%
group_by(iso2c, Iso2c) %>%
rename(value = `NV.IND.TOTL.KD`) %>%
mutate(value = round(value, 1)) %>%
summarise(Nobs = n(),
`Year 1` = first(year),
`Industry Share 1 (%)` = first(value),
`Year 2` = last(year),
`Industry Share 2 (%)` = last(value)) %>%
arrange(-Nobs) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Iso2c)),
Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
select(Flag, everything()) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}
NV.IND.TOTL.KD %>%
filter(iso2c %in% c("US", "FR", "CH")) %>%
left_join(iso2c, by = "iso2c") %>%
year_to_date %>%
filter(date >= as.Date("1997-01-01")) %>%
left_join(colors, by = c("Iso2c" = "country")) %>%
mutate(value = NV.IND.TOTL.KD/10^9) %>%
ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
xlab("") + ylab("Industry, value added (constant 2015 USD)") +
theme_minimal() + scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_continuous(breaks = seq(0, 10000, 500))
NV.IND.TOTL.KD %>%
filter(iso2c %in% c("US", "FR", "CH")) %>%
left_join(iso2c, by = "iso2c") %>%
year_to_date %>%
filter(date >= as.Date("1997-01-01")) %>%
left_join(colors, by = c("Iso2c" = "country")) %>%
mutate(value = NV.IND.TOTL.KD/10^9) %>%
ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
xlab("") + ylab("Industry, value added (constant 2015 USD)") +
theme_minimal() + scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = seq(0, 10000, 500))
NV.IND.TOTL.KD %>%
filter(iso2c %in% c("US", "FR", "CH")) %>%
left_join(iso2c, by = "iso2c") %>%
year_to_date %>%
filter(date >= as.Date("1997-01-01")) %>%
left_join(colors, by = c("Iso2c" = "country")) %>%
mutate(color = ifelse(iso2c == "US", color2, color)) %>%
group_by(Iso2c) %>%
mutate(value = 100*NV.IND.TOTL.KD/NV.IND.TOTL.KD[date == as.Date("1997-01-01")]) %>%
ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
xlab("") + ylab("Industry, value added (constant 2015 USD)") +
theme_minimal() + scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = seq(100, 200, 10))
NV.IND.TOTL.KD %>%
filter(iso2c %in% c("US", "FR", "DE")) %>%
left_join(iso2c, by = "iso2c") %>%
year_to_date %>%
filter(date >= as.Date("1997-01-01")) %>%
left_join(colors, by = c("Iso2c" = "country")) %>%
mutate(value = NV.IND.TOTL.KD/10^9) %>%
ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
xlab("") + ylab("Industry, value added (constant 2015 USD)") +
theme_minimal() + scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_continuous(breaks = seq(0, 10000, 500))
NV.IND.TOTL.KD %>%
filter(iso2c %in% c("US", "FR", "DE")) %>%
left_join(iso2c, by = "iso2c") %>%
year_to_date %>%
filter(date >= as.Date("1997-01-01")) %>%
left_join(colors, by = c("Iso2c" = "country")) %>%
mutate(value = NV.IND.TOTL.KD/10^9) %>%
ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
xlab("") + ylab("Industry, value added (constant 2015 USD)") +
theme_minimal() + scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = seq(0, 10000, 500))
NV.IND.TOTL.KD %>%
filter(iso2c %in% c("US", "FR", "DE")) %>%
left_join(iso2c, by = "iso2c") %>%
year_to_date %>%
filter(date >= as.Date("1997-01-01")) %>%
left_join(colors, by = c("Iso2c" = "country")) %>%
mutate(color = ifelse(iso2c == "US", color2, color)) %>%
group_by(Iso2c) %>%
mutate(value = 100*NV.IND.TOTL.KD/NV.IND.TOTL.KD[date == as.Date("1997-01-01")]) %>%
ggplot(.) + geom_line(aes(x = date, y = value, color = color)) +
xlab("") + ylab("Industry, value added (constant 2015 USD)") +
theme_minimal() + scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = seq(100, 200, 10))