nama_10_nfa_bs %>%
filter(geo %in% c("FR", "DE", "IT", "UK"),
time == "2019",
sector == "S1",
unit == "CP_MEUR") %>%
left_join(gdp, by = c("time", "geo")) %>%
mutate(values = round(100*values / gdp, 1)) %>%
left_join(asset10, by = "asset10") %>%
left_join(geo, by = "geo") %>%
mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
mutate(Geo = gsub(" ", "-", str_to_lower(Geo)),
Geo = paste0('<img src="../../icon/flag/vsmall/', Geo, '.png" alt="Flag">')) %>%
select(Geo, asset10, Asset10, values) %>%
spread(Geo, values) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}