National accounts aggregates by industry (up to NACE A*64)

Data - Eurostat

Info

Last observation: Annual: 2025 (N = 39,960)

First observation: Annual: 1975 (N = 15,411)

Last data update: 14 aoû 2026, 01:50. Last compile: 14 aoû 2026, 03:50

Structure

Profit share by sector, with many countries

C - Manufacturing

Code
nama_10_a64 |>
  filter(na_item %in% c("B1G","B2A3N"),
         geo %in% c("FR", "ES", "DE", "IT"),
         nace_r2 %in% c("C"),
         unit == "CP_MEUR") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  spread(na_item, values) |>
  mutate(values = B2A3N/B1G) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + theme_minimal()  + add_flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 5), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Profit Share, Manufacturing (% of GDP)") +
  scale_y_continuous(breaks = 0.01*seq(-30, 50, 2),
                labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed",  color = "black")

L - Real Estate Activities

Code
nama_10_a64 |>
  filter(na_item %in% c("B1G","B2A3N"),
         geo %in% c("FR", "ES", "DE", "IT"),
         nace_r2 %in% c("L"),
         unit == "CP_MEUR") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  spread(na_item, values) |>
  mutate(values = B2A3N/B1G) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + theme_minimal()  + add_flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 5), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Profit Share, Real Estate Activities (% of GDP)") +
  scale_y_continuous(breaks = 0.01*seq(-30, 100, 2),
                labels = percent_format(a = 1))

Manufacturing

Table by manuf. Value

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         unit == "CP_MEUR",
         time == "2019") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  spread(nace_r2, values) |>
  arrange(-TOTAL) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Table by manuf. share (% of GDP)

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         unit == "CP_MEUR",
         time == "2021") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  spread(nace_r2, values) |>
  mutate(`Part manufacturier` = 100*C/TOTAL) |>
  arrange(`Part manufacturier`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

2019 Table - All Manufacturing (€)

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         grepl("C", nace_r2) | nace_r2 == "TOTAL",
         unit == "CP_MEUR",
         time == "2019") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  spread(nace_r2, values) |>
  arrange(-TOTAL) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Some Manufacturing

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C10-C12", "C13-C15", "C16-C18", "C22_C23", "C29_C30", "TOTAL"),
         unit == "CP_MEUR",
         time == "2019") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  spread(nace_r2, values) |>
  arrange(-TOTAL) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Greece, Germany, Spain, France, Italy

2019 Table (% du PIB)

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("EL", "DE", "ES", "FR", "IT"),
         unit == "CP_MNAC",
         time == "2019") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  
  select(-geo) |>
  group_by(Geo) |>
  mutate(values = round(100* values/ values[nace_r2 == "TOTAL"], 2)) |>
  mutate(Geo = gsub(" ", "-", str_to_lower(Geo)),
         Geo = paste0('<img src="../../bib/flags/vsmall/', Geo, '.png" alt="Flag">')) |>
  spread(Geo, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

2019 Table (€)

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("EL", "DE", "ES", "FR", "IT"),
         unit == "CP_MNAC",
         time == "2019") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  
  select(-geo) |>
  mutate(Geo = gsub(" ", "-", str_to_lower(Geo)),
         Geo = paste0('<img src="../../bib/flags/vsmall/', Geo, '.png" alt="Flag">')) |>
  spread(Geo, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Manufacturing Value Added (% of GDP)

2019 France, Germany, Italy

Code
nama_10_a64 |>
  filter(geo %in% c("FR", "DE", "IT"),
         unit == "CP_MNAC",
         na_item == "B1G",
         time == "2019") |>
  
  select(geo, nace_r2, Nace_r2, values) |>
  group_by(geo) |>
  mutate(values = round(100*values /values[nace_r2 =="TOTAL"], 1)) |>
  spread(geo, values) |>
  filter(nace_r2 != "TOTAL") |>
  arrange(-FR) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

France: 2019, 1999, 1979

Code
nama_10_a64 |>
  filter(geo %in% c("FR"),
         unit == "CP_MNAC",
         na_item == "B1G",
         time %in% c("2019",  "1999", 1979)) |>
  
  select(time, nace_r2, Nace_r2, values) |>
  group_by(time) |>
  mutate(values = round(100*values /values[nace_r2 =="TOTAL"], 1)) |>
  spread(time, values) |>
  filter(nace_r2 != "TOTAL") |>
  arrange(-`2019`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

France, Germany, United Kingdom

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "UK"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y =values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing Value added (% of GDP)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

France, Germany, Greece, Italy, Portugal, Spain

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "EL", "ES", "IT", "PT"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(values = C/TOTAL) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing Value added (% of GDP)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "EL", "ES", "IT", "PT"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(values = C/TOTAL) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing Value added (% of GDP)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  arrange(date) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(values = C/TOTAL) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color, group = geo)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing Value added (% of GDP)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  geom_label_repel(data = . %>% group_by(geo)
                   %>% filter(date %in% c(max(date), min(date))),
                   aes(x = date, y = values, label = geo, color = color)) +
  geom_line(data = . %>% filter(geo == "FR"),
            aes(x = date, y = values, color = color), size = 2) +
  geom_line(data = . %>% filter(geo == "EL"),
            aes(x = date, y = values, color = color), size = 2)

France, Luxembourg, Cyprus

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "ME", "LU", "CY", "MT", "EL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(values = C/TOTAL) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing Value added (% of GDP)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

Greece, Portugal, Spain

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("EL", "PT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  ggplot() + geom_line(aes(x = date, y = C/TOTAL, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing Value added (% of GDP)") +
  scale_color_manual(values = c("#0D5EAF", "#006600", "#C60B1E")) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2016-01-01")) %>%
               mutate(date = as.Date("2016-01-01"),
                      image = paste0("../../icon/flag/round/", str_to_lower(Geo), ".png")),
             aes(x = date, y = C/TOTAL, image = image), asp = 1.5) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

1995-2018

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("EA20", "FR", "DE", "IT", "ES", "NL", "AT", "FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01"),
         date <= as.Date("2019-01-01")) |>
  
  select(geo, Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C/TOTAL) |>
  group_by(date) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values / values[1]) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "FR", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_identity() + add_flags +
  theme(legend.position = "none") +
  scale_x_date(breaks = seq(1995, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none") +
  geom_hline(yintercept = 100, linetype = "dashed")

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("EA20", "FR", "DE", "IT", "ES", "NL", "AT", "PL", "CZ"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01"),
         date <= as.Date("2019-01-01")) |>
  
  select(geo, Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C/TOTAL) |>
  group_by(date) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values / values[1]) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "FR", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_identity() +
  add_flags +
  theme(legend.position = "none") +
  scale_x_date(breaks = seq(1995, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none") +
  geom_hline(yintercept = 100, linetype = "dashed")

2000-2018

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("EA20", "FR", "DE", "IT", "ES", "NL", "AT", "FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("2000-01-01"),
         date <= as.Date("2019-01-01")) |>
  
  select(geo, Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C/TOTAL) |>
  group_by(date) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values / values[1]) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "FR", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none") +
  geom_hline(yintercept = 100, linetype = "dashed")

Comparing Deflators

Germany, France, Italy, Spain

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC",
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  
  select(-geo) |>
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(Geo, values) |>
  print_table_conditional()

C - Manufacturing

Table - PD10_NAC

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_NAC",
         nace_r2 %in% c("C", "TOTAL"),
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(nace_r2, values) |>
  arrange(`C`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Table - PD10_EUR

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_EUR",
         nace_r2 %in% c("C", "TOTAL"),
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(nace_r2, values) |>
  arrange(`C`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

C10-C12 - Food products

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_EUR",
         nace_r2 %in% c("C10-C12", "TOTAL"),
         time %in% c("1995", "2020")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2020`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2020`) |>
  spread(nace_r2, values) |>
  arrange(`C10-C12`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

C13-C15 - Textiles

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_NAC",
         nace_r2 %in% c("C13-C15", "TOTAL"),
         time %in% c("1995", "2020")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2020`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2020`) |>
  spread(nace_r2, values) |>
  arrange(`C13-C15`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

C27 - Manufacture of electrical equipment

Table - PD10_NAC

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_NAC",
         nace_r2 %in% c("C27", "TOTAL"),
         time %in% c("1995", "2020")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2020`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2020`) |>
  spread(nace_r2, values) |>
  arrange(`C27`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Table - PD10_EUR

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_EUR",
         nace_r2 %in% c("C26", "TOTAL"),
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(nace_r2, values) |>
  arrange(`C26`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Graph

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C27", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C27/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator (C27)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C26 - Computer, electronics

Table - PD10_NAC

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_NAC",
         nace_r2 %in% c("C26", "TOTAL"),
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(nace_r2, values) |>
  arrange(`C26`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Table - PD10_EUR

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_EUR",
         nace_r2 %in% c("C26", "TOTAL"),
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(nace_r2, values) |>
  arrange(`C26`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Graph

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C26", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C26/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator (C26)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C33 - Repair and installation of machinery and equipment

Table - PD10_NAC

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_NAC",
         nace_r2 %in% c("C33", "TOTAL"),
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(nace_r2, values) |>
  arrange(`C33`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Table - PD10_EUR

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         unit == "PD10_EUR",
         nace_r2 %in% c("C33", "TOTAL"),
         time %in% c("1995", "2019")) %>%
  select_if(~ n_distinct(.) > 1) |>
  spread(time, values) |>
  
  mutate(values = round(100*((`2019`/`1995`)^(1/24)-1),2)) |>
  select(-`1995`, -`2019`) |>
  spread(nace_r2, values) |>
  arrange(`C33`) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         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 .}

Graph

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C33", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C33/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator (C33)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

Germany, Italy, France, Spain, Netherlands

Table

Code
nace_r2 <- read_parquet("nace_r2_fr.parquet")
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC",
         time %in% c("2018")) |>
  filter(!grepl("C", nace_r2) | nace_r2 == "TOTAL") |>
  select(-na_item, -unit, -time) |>
  
  
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) |>
  select(nace_r2, Nace_r2, Flag, values) |>
  group_by(Flag) |>
  mutate(values = round(100*values/ values[nace_r2 == "TOTAL"], 1)) |>
  filter(nace_r2 != "TOTAL")  |>
  spread(Flag, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Table - Manufacturing

Code
nace_r2 <- read_parquet("nace_r2_fr.parquet")
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC",
         time %in% c("2018")) |>
  filter(grepl("C", nace_r2) | nace_r2 == "TOTAL") |>
  select(-na_item, -unit, -time) |>
  
  
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) |>
  select(nace_r2, Nace_r2, Flag, values) |>
  group_by(Flag) |>
  mutate(values = round(100*values/ values[nace_r2 == "TOTAL"], 1)) |>
  filter(nace_r2 != "TOTAL")  |>
  spread(Flag, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

B - Mining and quarrying

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("B", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "EL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `B`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Mining and quarrying (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, .1),
                     labels = percent_format(accuracy = .1))

D - Electricity, gas, steam and air conditioning supply

Value

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("D", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "EL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `D`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Electricity, gas, steam and air conditioning supply (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1961, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, .5),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("D", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "EL"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `D`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Electricity, gas, steam - Volume (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, .2),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("D", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "EL"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = D/TOTAL)  |>
  filter(date >= as.Date("1995-01-01")) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C - Manufacturing

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL", "EL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL", "EL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1995, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacturing (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = C/TOTAL)  |>
  filter(date >= as.Date("1995-01-01")) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C10-C12 - Food products

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C10-C12", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C10-C12`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Food products (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C10-C12", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  mutate(values = `C10-C12`/TOTAL) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Food products (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C10-C12", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C10-C12`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Food products (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C10-C12", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C10-C12`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C13-C15 - Textiles

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C13-C15", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C13-C15`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C13-C15", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C13-C15`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C13-C15", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C13-C15`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C13-C15", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C13-C15`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C13-C15", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  filter(date >= as.Date("1995-01-01")) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C13-C15`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C16 - Manufacture of paper and paper products

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C16", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C16`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C16", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C16`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C16", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C16`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C16", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C16`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C16", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  filter(date >= as.Date("1995-01-01")) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C16`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C16-C18 - Wood, Paper, Printing

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C16-C18", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  ggplot() + geom_line(aes(x = date, y = `C16-C18`/TOTAL, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Wood, Paper, Printing (% of GDP)") +
  scale_color_manual(values = c("#002395", "#000000", "#009246", "#C60B1E")) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2017-01-01")) %>%
               mutate(image = paste0("../../icon/flag/round/", str_to_lower(Geo), ".png")),
             aes(x = date, y = `C16-C18`/TOTAL, image = image), asp = 1.5) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C16-C18", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  ggplot() + geom_line(aes(x = date, y = `C16-C18`/TOTAL, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Wood, Paper, Printing (% of GDP)") +
  scale_color_manual(values = c("#002395", "#000000", "#009246", "#C60B1E")) +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2017-01-01")) %>%
               mutate(image = paste0("../../icon/flag/round/", str_to_lower(Geo), ".png")),
             aes(x = date, y = `C16-C18`/TOTAL, image = image), asp = 1.5) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

C17 - Textiles

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C17", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C17`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C17", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C17`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C17", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C17`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C17", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C17`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C17", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  filter(date >= as.Date("1995-01-01")) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C17`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C18 - Printing and reproduction of recorded media

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C18", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C18`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C18", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C18`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C18", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C18`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C18", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C18`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C18", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  filter(date >= as.Date("1995-01-01")) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C18`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C19 - Manufacture of coke and refined petroleum products

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C19", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C19`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C19", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C19`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C19", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C19`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C19", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C19`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C19", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  filter(date >= as.Date("1995-01-01")) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C19`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C20 - Manufacture of chemicals and chemical products

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C20", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C20`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C20", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C20`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C20", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C20`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Textiles (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C20", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C20`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C20", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  filter(date >= as.Date("1995-01-01")) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C20`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

C21 - Manufacture of basic pharmaceutical products and pharmaceutical preparations

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C21", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C21`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacture of basic pharmaceutical products (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C21", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C21`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacture of basic pharmaceutical products (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Volume

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C21", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C21`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacture of basic pharmaceutical products (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C21", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C21`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Manufacture of basic pharmaceutical products (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

Price Deflator

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C21", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C21`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 10))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C21", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  filter(date >= as.Date("1995-01-01")) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C21`/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  group_by(Geo) |>
  mutate(values = values/ values[1],
         color = ifelse(geo== "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_log10(breaks = 0.01*seq(-500, 200, 10))

C29 - Motor vehicles

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C29", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "EA20"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C29`/TOTAL) |>
  filter(!is.na(values)) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Motor vehicles (% of GDP)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) + add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.5),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C29", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "EA20"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C29`/TOTAL) |>
  filter(!is.na(values)) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Motor vehicles (% of GDP)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) + add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.5),
                     labels = percent_format(accuracy = .1))

2000-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C29", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("2000-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C29`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "NL", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Industrie automobile (% du PIB)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1995, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.5),
                     labels = percent_format(accuracy = .1))

France, Europe

B1G

Code
# nace_r2 <- read_parquet("nace_r2_fr.parquet")
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C29", "TOTAL"),
         geo %in% c("FR", "EA20"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  #filter(date >= as.Date("1995-01-01")) %>%
  
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C29`/TOTAL) |>
  filter(!is.na(values)) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Industrie automobile (% du PIB)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) + add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

P1

Code
# nace_r2 <- read_parquet("nace_r2_fr.parquet")
nama_10_a64 |>
  filter(na_item == "P1",
         nace_r2 %in% c("C29", "TOTAL"),
         geo %in% c("FR", "EA20"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  #filter(date >= as.Date("1995-01-01")) %>%
  
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) |>
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C29`/TOTAL) |>
  filter(!is.na(values)) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Production, industrie automobile (% de la production)") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) + add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

C29_C30 - Motor vehicles and other transport equipment

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C29_C30", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C29_C30`/TOTAL) |>
  ggplot() + geom_line(aes(x = date, y = values, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Motor vehicles and other transport equipment (% of GDP)") +
  scale_color_manual(values = c("#002395", "#000000", "#009246", "#C60B1E")) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) + add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.5),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C29_C30", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C29_C30`/TOTAL) |>
  ggplot() + geom_line(aes(x = date, y = values, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Motor vehicles and other transport equipment (% of GDP)") +
  scale_color_manual(values = c("#002395", "#000000", "#009246", "#C60B1E")) +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  add_flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.5),
                     labels = percent_format(accuracy = .1))

C28 - Machinery and equipment

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C28", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C28`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Machinery and equipment (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C28", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `C28`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Machinery and equipment (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

L - Real Estate

Value

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("L", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `L`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Real Estate (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("L", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `L`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Real Estate (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

Volume

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("L", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `L`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Real Estate (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("L", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "CLV10_MEUR") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = `L`/TOTAL) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Real Estate (% of GDP)") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

Price Deflator

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("L", "TOTAL"),
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         unit == "PD10_NAC") |>
  year_to_date() |>
  
  select(geo,  Geo, nace_r2, date, values) |>
  spread(nace_r2, values) |>
  mutate(values = L/TOTAL)  |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Price Deflator") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_log10(breaks = 0.01*seq(-500, 200, 10))

Individual Countries

France

Table

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("FR"),
         unit == "CP_MNAC",
         time %in% c("1978", "1998",  "2008", "2018")) |>
  
  select(nace_r2, Nace_r2, time, values) |>
  group_by(time) |>
  mutate(values = round(100*values/ values[nace_r2 == "TOTAL"], 1)) |>
  filter(nace_r2 != "TOTAL")  |>
  spread(time, values) |>
  print_table_conditional()

Manufacturing

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("FR"),
         unit == "CP_MNAC",
         time %in% c("1978", "1998",  "2008", "2018")) |>
  filter(grepl("C", nace_r2) | nace_r2 == "TOTAL") |>
  
  select(nace_r2, Nace_r2, time, values) |>
  group_by(time) |>
  mutate(values = round(100*values/ values[nace_r2 == "TOTAL"], 1)) |>
  filter(nace_r2 != "TOTAL")  |>
  spread(time, values) |>
  arrange(-`2018`) |>
  print_table_conditional()
nace_r2 Nace_r2 1978 1998 2008 2018
C Manufacturing 21.6 16.3 12.3 11.2
C10-C12 Manufacture of food products; beverages and tobacco products 3.0 2.5 1.9 1.9
C29_C30 Manufacture of motor vehicles, trailers, semi-trailers and of other transport equipment 2.3 1.9 1.5 1.6
C31-C33 Manufacture of furniture; jewellery, musical instruments, toys; repair and installation of machinery and equipment 2.8 1.9 1.6 1.6
C24_C25 Manufacture of basic metals and fabricated metal products, except machinery and equipment 2.2 2.1 1.7 1.4
C33 Repair and installation of machinery and equipment NA 1.4 1.1 1.3
C25 Manufacture of fabricated metal products, except machinery and equipment NA 1.5 1.2 1.1
C30 Manufacture of other transport equipment NA 0.6 0.7 1.0
C22_C23 Manufacture of rubber and plastic products and other non-metallic mineral products 2.1 1.5 1.1 0.9
C20 Manufacture of chemicals and chemical products 1.5 1.0 0.7 0.8
C16-C18 Manufacture of wood, paper, printing and reproduction 1.3 1.1 0.7 0.6
C21 Manufacture of basic pharmaceutical products and pharmaceutical preparations 0.6 0.7 0.7 0.6
C28 Manufacture of machinery and equipment n.e.c. 1.6 1.0 0.9 0.6
C29 Manufacture of motor vehicles, trailers and semi-trailers NA 1.3 0.8 0.6
C22 Manufacture of rubber and plastic products NA 0.9 0.6 0.5
C26 Manufacture of computer, electronic and optical products 1.3 0.9 0.6 0.5
C23 Manufacture of other non-metallic mineral products NA 0.6 0.5 0.4
C27 Manufacture of electrical equipment 1.0 0.7 0.5 0.4
C31_C32 Manufacture of furniture; other manufacturing NA 0.6 0.4 0.4
C13-C15 Manufacture of textiles, wearing apparel, leather and related products 1.8 0.8 0.4 0.3
C17 Manufacture of paper and paper products NA 0.5 0.3 0.3
C24 Manufacture of basic metals NA 0.6 0.5 0.3
C16 Manufacture of wood and of products of wood and cork, except furniture; manufacture of articles of straw and plaiting materials NA 0.3 0.2 0.2
C18 Printing and reproduction of recorded media NA 0.4 0.2 0.2
C19 Manufacture of coke and refined petroleum products 0.2 0.1 0.1 0.1

Construction, Human health, Manufacturing, Real estate

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("FR"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("FR"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 30, 2),
                     labels = percent_format(accuracy = 1),
                     limits = c(0, 0.3)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Germany

Table

All

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("DE"),
         unit == "CP_MNAC",
         time %in% c("1978", "1998",  "2008", "2018")) |>
  
  select(nace_r2, Nace_r2, time, values) |>
  group_by(time) |>
  mutate(values = round(100*values/ values[nace_r2 == "TOTAL"], 1)) |>
  filter(nace_r2 != "TOTAL")  |>
  spread(time, values) |>
  print_table_conditional()

Manufacturing

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         geo %in% c("DE"),
         unit == "CP_MNAC",
         time %in% c("1978", "1998",  "2008", "2018")) |>
  filter(grepl("C", nace_r2) | nace_r2 == "TOTAL") |>
  
  select(nace_r2, Nace_r2, time, values) |>
  group_by(time) |>
  mutate(values = round(100*values/ values[nace_r2 == "TOTAL"], 1)) |>
  filter(nace_r2 != "TOTAL")  |>
  spread(time, values) |>
  arrange(-`2018`) |>
  print_table_conditional()
nace_r2 Nace_r2 1998 2008 2018
C Manufacturing 22.2 22.1 22.2
C29_C30 Manufacture of motor vehicles, trailers, semi-trailers and of other transport equipment 3.4 3.6 4.9
C29 Manufacture of motor vehicles, trailers and semi-trailers 3.1 3.2 4.4
C28 Manufacture of machinery and equipment n.e.c. 3.2 3.7 3.5
C24_C25 Manufacture of basic metals and fabricated metal products, except machinery and equipment 2.8 3.1 2.7
C25 Manufacture of fabricated metal products, except machinery and equipment 1.9 2.0 1.9
C22_C23 Manufacture of rubber and plastic products and other non-metallic mineral products 2.0 1.7 1.6
C10-C12 Manufacture of food products; beverages and tobacco products 1.9 1.6 1.5
C20 Manufacture of chemicals and chemical products 1.8 1.6 1.5
C26 Manufacture of computer, electronic and optical products 1.3 1.4 1.5
C27 Manufacture of electrical equipment 1.7 1.6 1.5
C31-C33 Manufacture of furniture; jewellery, musical instruments, toys; repair and installation of machinery and equipment 1.4 1.4 1.3
C22 Manufacture of rubber and plastic products 1.1 1.0 1.0
C16-C18 Manufacture of wood, paper, printing and reproduction 1.5 1.1 0.8
C24 Manufacture of basic metals 0.9 1.1 0.8
C31_C32 Manufacture of furniture; other manufacturing 0.9 0.8 0.8
C21 Manufacture of basic pharmaceutical products and pharmaceutical preparations 0.6 0.9 0.7
C23 Manufacture of other non-metallic mineral products 0.9 0.6 0.6
C30 Manufacture of other transport equipment 0.3 0.4 0.5
C33 Repair and installation of machinery and equipment 0.5 0.6 0.5
C17 Manufacture of paper and paper products 0.5 0.4 0.4
C19 Manufacture of coke and refined petroleum products 0.2 0.1 0.4
C13-C15 Manufacture of textiles, wearing apparel, leather and related products 0.5 0.3 0.3
C16 Manufacture of wood and of products of wood and cork, except furniture; manufacture of articles of straw and plaiting materials 0.4 0.3 0.2
C18 Printing and reproduction of recorded media 0.6 0.4 0.2

Construction, Human health, Manufacturing, Real estate

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("DE"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 30, 2),
                     labels = percent_format(accuracy = 1),
                     limits = c(0, 0.3)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Italy

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("IT"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Spain

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("ES"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Netherlands

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("NL"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Danemark

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("DK"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Belgium

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("BE"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Finland

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Portugal

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("PT"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Austria

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("AT"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Sweden

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("SE"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Iceland

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("IS"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  
  select(nace_r2, Nace_r2, date, values) |>
  group_by(date) |>
  mutate(values = values/ values[nace_r2 == "TOTAL"]) |>
  filter(nace_r2 != "TOTAL")  |>
  ggplot() + geom_line(aes(x = date, y = values, color = Nace_r2)) + 
  theme_minimal() + xlab("") + ylab("% of GDP") +
  scale_color_manual(values = viridis(5)[1:4]) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.85),
        legend.title = element_blank())

Relative to EA Manufacturing Value Added

1995-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 == "C",
         geo %in% c("EA20", "FR", "DE", "IT", "ES", "NL", "AT", "FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01")) |>
  #filter(date <= as.Date("2019-01-01")) %>%
  
  group_by(date) |>
  filter(n() == 8) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values / values[1]) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "FR", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none")

All-

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 == "C",
         unit == "CP_MNAC",
         !(geo %in% c("BG", "RO", "RS"))) |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01"),
         date <= as.Date("2023-01-01")) |>
  
  group_by(geo) |>
  filter(n() == 29) |>
  group_by(date) |>
  filter(!is.na(values)) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values / values[1]) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color, group = geo)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(0, 1000, 100), seq(10, 100, 10))) +
  theme(legend.position = "none") +
  geom_label_repel(data = . %>% group_by(geo)
                   %>% filter(date %in% c(max(date), min(date))),
                   aes(x = date, y = values, label = geo, color = color)) +
  geom_line(data = . %>% filter(geo == "FR"),
            aes(x = date, y = values, color = color), size = 2) +
  geom_line(data = . %>% filter(geo == "EL"),
            aes(x = date, y = values, color = color), size = 2)

2000-2019

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 == "C",
         geo %in% c("EA20", "FR", "DE", "IT", "ES", "NL", "AT", "FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("2000-01-01"),
         date <= as.Date("2019-01-01")) |>
  
  group_by(date) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values / values[1]) |>
  left_join(colors, by = c("Geo" = "country")) |>
  mutate(color = ifelse(geo == "FR", color2, color)) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none")

2000-2018 + Grèce

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 == "C",
         geo %in% c("EA20", "FR", "DE", "IT", "EL", "NL", "AT", "FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("2000-01-01")) |>
  filter(date <= as.Date("2018-01-01")) |>
  
  group_by(date) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values / values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_manual(values = c("#ED2939", "#003580", "#002395", "#000000",
                                "#0D5EAF", "#009246", "#AE1C28")) +
  scale_x_date(breaks = seq(1960, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2012-01-01")) %>%
               mutate(image = paste0("../../icon/flag/round/", str_to_lower(Geo), ".png")),
             aes(x = date, y = values, image = image), asp = 1.5) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none")

Industry

1995-2018

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 == "B-E",
         geo %in% c("EA20", "FR", "DE", "IT", "ES", "NL", "AT", "FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("1995-01-01"),
         date <= as.Date("2019-01-01")) |>
  
  group_by(date) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values/values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_manual(values = c("#ED2939", "#003580", "#002395", "#000000",
                                "#009246", "#AE1C28", "#FFC400")) +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2008-01-01")) %>%
               mutate(image = paste0("../../icon/flag/round/", str_to_lower(Geo), ".png")),
             aes(x = date, y = values, image = image), asp = 1.5) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none")

2000-2018

Code
nama_10_a64 |>
  filter(na_item == "B1G",
         nace_r2 == "B-E",
         geo %in% c("EA20", "FR", "DE", "IT", "ES", "NL", "AT", "FI"),
         unit == "CP_MNAC") |>
  year_to_date() |>
  filter(date >= as.Date("2000-01-01")) |>
  #filter(date <= as.Date("2018-01-01")) %>%
  
  group_by(date) |>
  filter(n() == 8) |>
  mutate(values = values /values[geo == "EA20"]) |>
  filter(geo != "EA20") |>
  group_by(geo) |>
  mutate(values = 100*values/values[1]) |>
  ggplot() + geom_line(aes(x = date, y = values, color = Geo)) + 
  theme_minimal() + xlab("") + ylab("Valeur ajoutée manuf. par rapport à la Zone €") +
  scale_color_manual(values = c("#ED2939", "#003580", "#002395", "#000000",
                                "#009246", "#AE1C28", "#FFC400")) +
  geom_image(data = . %>%
               filter(date == as.Date("2016-01-01")) %>%
               mutate(image = paste0("../../icon/flag/round/", str_to_lower(Geo), ".png")),
             aes(x = date, y = values, image = image), asp = 1.5) +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none")