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

Data - Eurostat

Info

source dataset .html .RData

eurostat

nama_10_a64

2024-06-20 2024-06-18

eurostat

nama_10_a64_e

2024-06-23 2024-06-18

Data on macro

source dataset .html .RData

eurostat

nama_10_a10

2024-06-23 2024-06-08

eurostat

nama_10_a10_e

2024-06-23 2024-06-23

eurostat

nama_10_gdp

2024-06-20 2024-06-18

eurostat

nama_10_lp_ulc

2024-06-20 2024-06-08

eurostat

namq_10_a10

2024-06-20 2024-06-23

eurostat

namq_10_a10_e

2024-06-20 2024-06-08

eurostat

namq_10_gdp

2024-06-20 2024-06-08

eurostat

namq_10_lp_ulc

2024-06-20 2024-06-08

eurostat

namq_10_pc

2024-06-20 2024-06-18

eurostat

nasa_10_nf_tr

2024-06-21 2024-06-08

eurostat

nasq_10_nf_tr

2024-06-20 2024-06-08

fred

gdp

2024-06-20 2024-06-07

oecd

QNA

2024-06-06 2024-06-05

oecd

SNA_TABLE1

2024-06-20 2024-06-01

oecd

SNA_TABLE14A

2024-06-20 2024-04-15

oecd

SNA_TABLE2

2024-06-20 2024-04-11

oecd

SNA_TABLE6A

2024-06-20 2024-04-15

wdi

NE.RSB.GNFS.ZS

2024-06-20 2024-04-14

wdi

NY.GDP.MKTP.CD

2024-06-20 2024-05-06

wdi

NY.GDP.MKTP.PP.CD

2024-06-20 2024-04-14

wdi

NY.GDP.PCAP.CD

2024-06-20 2024-04-22

wdi

NY.GDP.PCAP.KD

2024-06-20 2024-05-06

wdi

NY.GDP.PCAP.PP.CD

2024-06-20 2024-04-22

wdi

NY.GDP.PCAP.PP.KD

2024-06-20 2024-05-06

Data on industry

Code
load_data("industry.RData")
industry %>%
  arrange(-(dataset == "nama_10_a64")) %>%
  source_dataset_file_updates()
source dataset .html .RData

ec

INDUSTRY

2024-06-19 2023-10-01

eurostat

ei_isin_m

2024-06-23 2024-06-08

eurostat

htec_trd_group4

2024-06-23 2024-06-08

eurostat

nama_10_a64

2024-06-20 2024-06-18

eurostat

nama_10_a64_e

2024-06-23 2024-06-18

eurostat

namq_10_a10_e

2024-06-20 2024-06-08

eurostat

road_eqr_carmot

2024-06-20 2024-06-08

eurostat

sts_inpp_m

2024-06-20 2024-06-18

eurostat

sts_inppd_m

2024-06-20 2024-06-08

eurostat

sts_inpr_m

2024-06-20 2024-06-08

eurostat

sts_intvnd_m

2024-06-20 2024-06-08

fred

industry

2024-06-20 2024-06-07

oecd

ALFS_EMP

2024-04-16 2024-05-12

oecd

BERD_MA_SOF

2024-04-16 2023-09-09

oecd

GBARD_NABS2007

2024-04-16 2023-11-22

oecd

MEI_REAL

2024-05-12 2024-05-03

oecd

MSTI_PUB

2024-06-20 2023-10-04

oecd

SNA_TABLE4

2024-06-20 2024-04-30

wdi

NV.IND.EMPL.KD

2024-01-06 2024-04-14

wdi

NV.IND.MANF.CD

2024-06-20 2024-06-09

wdi

NV.IND.MANF.ZS

2024-01-06 2024-04-14

wdi

NV.IND.TOTL.KD

2024-01-06 2024-04-14

wdi

NV.IND.TOTL.ZS

2024-01-06 2024-04-14

wdi

SL.IND.EMPL.ZS

2024-01-06 2024-04-14

wdi

TX.VAL.MRCH.CD.WT

2024-01-06 2024-04-14

LAST_COMPILE

LAST_COMPILE
2024-06-24

Last

Code
nama_10_a64 %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(2) %>%
  print_table_conditional()
time Nobs
2023 24102
2022 152384

na_item

Code
nama_10_a64 %>%
  left_join(na_item, by = "na_item") %>%
  group_by(na_item, Na_item) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional
na_item Na_item Nobs
B1G Value added, gross 2001415
P51C Consumption of fixed capital 1458257
P1 Output 987249
P2 Intermediate consumption 956194
D1 Compensation of employees 381802
D11 Wages and salaries 380351
D29X39 Other taxes less other subsidies on production 377484
B2A3N Operating surplus and mixed income, net 312708

nace_r2

All

Code
nama_10_a64 %>%
  left_join(nace_r2, by = "nace_r2") %>%
  group_by(nace_r2, Nace_r2) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional

Manufacturing

  • NACE Codes, Eurostat. html

  • NACE Codes, IL. pdf

  • Food. html

Code
nama_10_a64 %>%
  filter(grepl("C", nace_r2)) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  group_by(nace_r2, Nace_r2) %>%
  summarise(Nobs = n()) %>%
  arrange(nace_r2) %>%
  print_table_conditional
nace_r2 Nace_r2 Nobs
C Manufacturing 79119
C10-C12 Manufacture of food products; beverages and tobacco products 76405
C13-C15 Manufacture of textiles, wearing apparel, leather and related products 76397
C16 Manufacture of wood and of products of wood and cork, except furniture; manufacture of articles of straw and plaiting materials 74515
C16-C18 Manufacture of wood, paper, printing and reproduction 76399
C17 Manufacture of paper and paper products 74525
C18 Printing and reproduction of recorded media 74536
C19 Manufacture of coke and refined petroleum products 72393
C20 Manufacture of chemicals and chemical products 74948
C21 Manufacture of basic pharmaceutical products and pharmaceutical preparations 75833
C22 Manufacture of rubber and plastic products 74543
C22_C23 Manufacture of rubber and plastic products and other non-metallic mineral products 76399
C23 Manufacture of other non-metallic mineral products 74543
C24 Manufacture of basic metals 74536
C24_C25 Manufacture of basic metals and fabricated metal products, except machinery and equipment 76399
C25 Manufacture of fabricated metal products, except machinery and equipment 74547
C26 Manufacture of computer, electronic and optical products 76396
C27 Manufacture of electrical equipment 76344
C28 Manufacture of machinery and equipment n.e.c. 76396
C29 Manufacture of motor vehicles, trailers and semi-trailers 74541
C29_C30 Manufacture of motor vehicles, trailers, semi-trailers and of other transport equipment 76405
C30 Manufacture of other transport equipment 74221
C31-C33 Manufacture of furniture; jewellery, musical instruments, toys; repair and installation of machinery and equipment 76399
C31_C32 Manufacture of furniture; other manufacturing 74543
C33 Repair and installation of machinery and equipment 74519
  • Sublists, non overlapping
Code
nama_10_a64 %>%
  filter(grepl("C", nace_r2),
         !(nace_r2 %in% c("C16", "C17", "C18", "C22", "C23", "C24", "C25",
                          "C29", "C30", "C33"))) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  group_by(nace_r2, Nace_r2) %>%
  summarise(Nobs = n()) %>%
  arrange(nace_r2) %>%
  print_table_conditional
nace_r2 Nace_r2 Nobs
C Manufacturing 79119
C10-C12 Manufacture of food products; beverages and tobacco products 76405
C13-C15 Manufacture of textiles, wearing apparel, leather and related products 76397
C16-C18 Manufacture of wood, paper, printing and reproduction 76399
C19 Manufacture of coke and refined petroleum products 72393
C20 Manufacture of chemicals and chemical products 74948
C21 Manufacture of basic pharmaceutical products and pharmaceutical preparations 75833
C22_C23 Manufacture of rubber and plastic products and other non-metallic mineral products 76399
C24_C25 Manufacture of basic metals and fabricated metal products, except machinery and equipment 76399
C26 Manufacture of computer, electronic and optical products 76396
C27 Manufacture of electrical equipment 76344
C28 Manufacture of machinery and equipment n.e.c. 76396
C29_C30 Manufacture of motor vehicles, trailers, semi-trailers and of other transport equipment 76405
C31-C33 Manufacture of furniture; jewellery, musical instruments, toys; repair and installation of machinery and equipment 76399
C31_C32 Manufacture of furniture; other manufacturing 74543

unit

Code
nama_10_a64 %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional
unit Unit Nobs
CP_MEUR Current prices, million euro 817055
CP_MNAC Current prices, million units of national currency 817055
PC_TOT Percentage of total 796747
PYP_MNAC Previous year prices, million units of national currency 292144
PYP_MEUR Previous year prices, million euro 291957
CLV10_MEUR Chain linked volumes (2010), million euro 281125
CLV10_MNAC Chain linked volumes (2010), million units of national currency 281125
CLV05_MEUR Chain linked volumes (2005), million euro 279820
CLV05_MNAC Chain linked volumes (2005), million units of national currency 279820
CLV_I10 Chain linked volumes, index 2010=100 277738
PD10_EUR Price index (implicit deflator), 2010=100, euro 276299
PD10_NAC Price index (implicit deflator), 2010=100, national currency 276299
CLV15_MEUR Chain linked volumes (2015), million euro 273278
CLV15_MNAC Chain linked volumes (2015), million units of national currency 273278
CLV_I15 Chain linked volumes, index 2015=100 270071
PD15_NAC Price index (implicit deflator), 2015=100, national currency 269199
CLV_PCH_PRE Chain linked volumes, percentage change on previous period 268039
PD_PCH_PRE_NAC Price index (implicit deflator), percentage change on previous period, national currency 267293
PD_PCH_PRE_EUR Price index (implicit deflator), percentage change on previous period, euro 267118

time

Code
nama_10_a64 %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  print_table_conditional

geo

Code
nama_10_a64 %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  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 .}

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")) %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 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")) %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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") %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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)) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(geo, by = "geo") %>%
  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_3flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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, 2022, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  add_6flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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, 2022, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  add_6flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 1),
                     labels = percent_format(accuracy = 1))

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")) %>%
  left_join(geo, by = "geo") %>%
  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, 2022, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  add_6flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, nace_r2, date, values) %>%
  spread(nace_r2, values) %>%
  mutate(values = C/TOTAL) %>%
  group_by(date) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values / values[date == as.Date("1995-01-01")]) %>%
  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_7flags +
  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("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, nace_r2, date, values) %>%
  spread(nace_r2, values) %>%
  mutate(values = C/TOTAL) %>%
  group_by(date) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values / values[date == as.Date("1995-01-01")]) %>%
  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_8flags +
  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("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, nace_r2, date, values) %>%
  spread(nace_r2, values) %>%
  mutate(values = C/TOTAL) %>%
  group_by(date) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values / values[date == as.Date("2000-01-01")]) %>%
  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_7flags +
  scale_x_date(breaks = seq(1960, 2020, 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) %>%
  left_join(geo, by = "geo") %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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) %>%
  left_join(geo, by = "geo") %>%
  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) %>%
  left_join(geo, by = "geo") %>%
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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
load_data("eurostat/nace_r2_fr.RData")
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) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  left_join(geo, by = "geo") %>%
  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
load_data("eurostat/nace_r2_fr.RData")
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) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  left_join(geo, by = "geo") %>%
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_6flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_6flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  scale_x_date(breaks = seq(1960, 2026, 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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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")) %>%
  left_join(geo, by = "geo") %>%
  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, 2026, 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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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", "EA"),
         unit == "CP_MNAC") %>%
  year_to_date() %>%
  left_join(geo, by = "geo") %>%
  mutate(Geo = ifelse(geo == "EA", "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_5flags +
  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", "EA"),
         unit == "CP_MNAC") %>%
  year_to_date() %>%
  filter(date >= as.Date("1995-01-01")) %>%
  left_join(geo, by = "geo") %>%
  mutate(Geo = ifelse(geo == "EA", "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_5flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  scale_x_date(breaks = seq(1995, 2026, 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
# load_data("eurostat/nace_r2_fr.RData")
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")) %>%
  left_join(geo, by = "geo") %>%
  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_2flags +
  theme(legend.position = "none") +
  scale_y_continuous(breaks = 0.01*seq(-500, 200, 0.1),
                     labels = percent_format(accuracy = .1))

P1

Code
# load_data("eurostat/nace_r2_fr.RData")
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")) %>%
  left_join(geo, by = "geo") %>%
  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_2flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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, 2026, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  add_4flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  scale_x_date(breaks = seq(1960, 2026, 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() %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_4flags +
  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")) %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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() %>%
  left_join(geo, by = "geo") %>%
  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_5flags +
  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")) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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") %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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 Industrie manufacturière 21.7 16.4 12.3 11.2
C10-C12 Industries alimentaires; fabrication de boissons et de produits à base de tabac 3.4 2.8 2.1 2.1
C29_C30 Industrie automobile et construction navale 2.3 1.9 1.5 1.6
C31-C33 Fabrication de meubles, bijouterie, instruments de musique, jouets, réparation et installation de machines et équipements 2.6 1.8 1.4 1.4
C24_C25 Métallurgie et fabrication de produits métalliques, à l'exception des machines et des équipements 1.9 1.9 1.5 1.2
C33 Réparation et installation de machines et d'équipements NA 1.2 1.0 1.1
C25 Fabrication de produits métalliques, à l'exception des machines et des équipements NA 1.3 1.1 1.0
C20 Industrie chimique 1.7 1.2 0.8 0.9
C22_C23 Fabrication de produits en caoutchouc et en plastique et autres produits minéraux non métalliques 2.2 1.6 1.2 0.9
C30 Fabrication d'autres matériels de transport NA 0.6 0.6 0.9
C21 Industrie pharmaceutique 0.6 0.7 0.7 0.6
C26 Fabrication de produits informatiques, électroniques et optiques 1.5 1.1 0.7 0.6
C28 Fabrication de machines et équipements n.c.a. 1.4 0.9 0.8 0.6
C29 Industrie automobile NA 1.3 0.8 0.6
C16-C18 Travail du bois et du papier, imprimerie et reproduction 1.2 1.1 0.7 0.5
C22 Fabrication de produits en caoutchouc et en plastique NA 1.0 0.7 0.5
C23 Fabrication d'autres produits minéraux non métalliques NA 0.6 0.5 0.4
C13-C15 Fabrication de textiles, industrie de l'habillement, du cuir et de la chaussure 1.6 0.7 0.3 0.3
C24 Métallurgie NA 0.6 0.5 0.3
C27 Fabrication d'équipements électriques 0.9 0.7 0.4 0.3
C31_C32 Fabrication de meubles; autres industries manufacturières NA 0.6 0.4 0.3
C17 Industrie du papier et du carton NA 0.4 0.2 0.2
C18 Imprimerie et reproduction d'enregistrements NA 0.4 0.3 0.2
C16 Travail du bois et fabrication d'articles en bois et en liège, à l'exception des meubles; fabrication d'articles en vannerie et sparterie NA 0.3 0.2 0.1
C19 Cokéfaction et raffinage 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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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")) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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")) %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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") %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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 Industrie manufacturière 22.5 22.3 22.2
C29_C30 Industrie automobile et construction navale 3.5 3.7 5.0
C29 Industrie automobile 3.1 3.2 4.5
C28 Fabrication de machines et équipements n.c.a. 3.2 3.7 3.5
C24_C25 Métallurgie et fabrication de produits métalliques, à l'exception des machines et des équipements 2.9 3.2 2.7
C25 Fabrication de produits métalliques, à l'exception des machines et des équipements 1.9 2.1 1.9
C10-C12 Industries alimentaires; fabrication de boissons et de produits à base de tabac 1.9 1.6 1.6
C22_C23 Fabrication de produits en caoutchouc et en plastique et autres produits minéraux non métalliques 2.0 1.7 1.6
C20 Industrie chimique 1.8 1.6 1.5
C27 Fabrication d'équipements électriques 1.7 1.6 1.5
C26 Fabrication de produits informatiques, électroniques et optiques 1.3 1.4 1.4
C31-C33 Fabrication de meubles, bijouterie, instruments de musique, jouets, réparation et installation de machines et équipements 1.4 1.4 1.3
C22 Fabrication de produits en caoutchouc et en plastique 1.1 1.0 1.0
C16-C18 Travail du bois et du papier, imprimerie et reproduction 1.5 1.1 0.8
C21 Industrie pharmaceutique 0.6 0.9 0.8
C24 Métallurgie 1.0 1.1 0.8
C31_C32 Fabrication de meubles; autres industries manufacturières 0.9 0.8 0.8
C23 Fabrication d'autres produits minéraux non métalliques 0.9 0.6 0.6
C30 Fabrication d'autres matériels de transport 0.4 0.4 0.5
C33 Réparation et installation de machines et d'équipements 0.5 0.6 0.5
C17 Industrie du papier et du carton 0.5 0.4 0.4
C13-C15 Fabrication de textiles, industrie de l'habillement, du cuir et de la chaussure 0.5 0.3 0.2
C16 Travail du bois et fabrication d'articles en bois et en liège, à l'exception des meubles; fabrication d'articles en vannerie et sparterie 0.4 0.3 0.2
C18 Imprimerie et reproduction d'enregistrements 0.6 0.4 0.2
C19 Cokéfaction et raffinage 0.2 0.2 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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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())

United Kingdom

Code
nama_10_a64 %>%
  filter(na_item == "B1G",
         nace_r2 %in% c("C", "TOTAL", "L", "Q", "F"),
         geo %in% c("UK"),
         unit == "CP_MNAC") %>%
  year_to_date() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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() %>%
  left_join(nace_r2, by = "nace_r2") %>%
  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("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  group_by(date) %>%
  filter(n() == 8) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values / values[date == as.Date("1995-01-01")]) %>%
  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_7flags +
  scale_x_date(breaks = seq(1960, 2023, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none")

2000-2019

Code
nama_10_a64 %>%
  filter(na_item == "B1G",
         nace_r2 == "C",
         geo %in% c("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  group_by(date) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values / values[date == as.Date("2000-01-01")]) %>%
  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_7flags +
  scale_x_date(breaks = seq(1960, 2023, 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("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  group_by(date) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values / values[date == as.Date("2000-01-01")]) %>%
  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, 2020, 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("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  group_by(date) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values/values[date == as.Date("1995-01-01")]) %>%
  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, 2020, 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("EA", "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")) %>%
  left_join(geo, by = "geo") %>%
  group_by(date) %>%
  filter(n() == 8) %>%
  mutate(values = values /values[geo == "EA"]) %>%
  filter(geo != "EA") %>%
  group_by(geo) %>%
  mutate(values = 100*values/values[date == as.Date("2000-01-01")]) %>%
  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, 2030, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200, 5)) +
  theme(legend.position = "none")