Value added and its components by activity, ISIC rev4

Data - OECD


Info

LAST_COMPILE

LAST_COMPILE
2024-07-01

Last

obsTime Nobs
2023 3

ACTIVITY

Code
SNA_TABLE6A %>%
  left_join(SNA_TABLE6A_var$ACTIVITY, by = "ACTIVITY") %>%
  group_by(ACTIVITY, Activity) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()

TRANSACT

Code
SNA_TABLE6A %>%
  left_join(SNA_TABLE6A_var$TRANSACT, by = "TRANSACT") %>%
  group_by(TRANSACT, Transact) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
TRANSACT Transact Nobs
B1GA Gross value added 486869
K1A Consumption of fixed capital 298130
P1A Output 231627
P2A Intermediate consumption 227487
D1A Compensation of employees 103207
D29_D39A Other taxes less other subsidies on production 102731
B2G_B3GA Gross operating surplus and gross mixed income 95040
D11A of which: gross wages and salaries 94809
B2N_B3NA Net operating surplus and net mixed income 90737
B1_GE Gross domestic product (expenditure approach) 2633

MEASURE

Code
SNA_TABLE6A %>%
  left_join(SNA_TABLE6A_var$MEASURE, by = "MEASURE") %>%
  group_by(MEASURE, Measure) %>%
  summarise(Nobs = n()) %>%
  print_table_conditional()
MEASURE Measure Nobs
C Current prices 896620
DOB Deflator, OECD base year = 100 235895
V Constant prices, national base year 247826
VOB Constant prices, OECD base year 94644
VP Constant prices, previous year prices 258285

LOCATION

Code
SNA_TABLE6A %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  group_by(LOCATION, Location) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

obsTime

Code
SNA_TABLE6A %>%
  group_by(obsTime) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(obsTime)) %>%
  print_table_conditional()

Real Estate

Table

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VL", "VTOT"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, LOCATION, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(value = B1GA_VL / B1_GE_VTOT) %>%
  filter(!is.na(value)) %>%
  group_by(LOCATION, Location) %>%
  summarise(year1 = first(year(date)),
            value1 = first(value),
            year2 = last(year(date)),
            value2 = last(value)) %>%
  mutate_at(vars(value1, value2), funs(round(100*., digits = 1))) %>%
  arrange(value2) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

France, Greece, Italy, Spain

All

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VL", "VTOT"),
         LOCATION %in% c("GRC", "FRA", "ITA", "ESP"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VL / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_4flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Real Estate (% of GDP)") + xlab("")

1995-

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VL", "VTOT"),
         LOCATION %in% c("GRC", "FRA", "ITA", "ESP"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  filter(date >= as.Date("1995-01-01")) %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VL / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_4flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Real Estate (% of GDP)") + xlab("")

France, Germany, US

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VL", "VTOT"),
         LOCATION %in% c("FRA", "DEU", "USA"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VL / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Real Estate (% of GDP)") + xlab("")

New Zealand, UK, US

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VL", "VTOT"),
         LOCATION %in% c("GBR", "NZL", "USA"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VL / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Real Estate (% of GDP)") + xlab("")

Low Manufacturing

Table

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, LOCATION, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(value = B1GA_VC / B1_GE_VTOT) %>%
  filter(!is.na(value)) %>%
  group_by(LOCATION, Location) %>%
  summarise(year1 = first(year(date)),
            value1 = first(value),
            year2 = last(year(date)),
            value2 = last(value)) %>%
  mutate_at(vars(value1, value2), funs(round(100*., digits = 1))) %>%
  arrange(value2) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Luxembourg, Cyprus, Australia

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("LUX", "CYP", "AUS"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Albania, Norway, Greece

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("ALB", "NOR", "GRC"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Malta, Iceland, United Kingdom

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("MLT", "ISL", "GBR"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(LOCATION, VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  mutate(color = ifelse(LOCATION == "ISL", color2, color)) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Chile, Canada, France

All

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("CHL", "CAN", "FRA"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(LOCATION, VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

2007-

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("CHL", "CAN", "FRA"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  filter(date >= as.Date("2007-01-01")) %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(LOCATION, VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

New Zealand, Latvia, Brazil

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("NZL", "LVA", "BRA"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(LOCATION, VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  mutate(color = ifelse(LOCATION == "ISL", color2, color)) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Netherlands, United States, Costa Rica

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("NLD", "USA", "CRI"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(LOCATION, VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  mutate(color = ifelse(LOCATION == "ISL", color2, color)) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Spain, Colombia, Portugal

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("ESP", "COL", "PRT"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(LOCATION, VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  mutate(color = ifelse(LOCATION == "ISL", color2, color)) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

High Manufacturing

Table

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, LOCATION, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(value = B1GA_VC / B1_GE_VTOT) %>%
  filter(!is.na(value)) %>%
  group_by(LOCATION, Location) %>%
  summarise(year1 = first(year(date)),
            value1 = first(value),
            year2 = last(year(date)),
            value2 = last(value)) %>%
  mutate_at(vars(value1, value2), funs(round(100*., digits = 1))) %>%
  arrange(-value2) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Ireland, South Korea, Czech Republic

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("IRL", "KOR", "CZE"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 40, 2),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Slovenia, Germany, Romania

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("SVN", "DEU", "ROU"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 40, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Turkey, Switzerland, Slovak Republic

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("TUR", "CHE", "SVK"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(LOCATION, VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  mutate(color = ifelse(LOCATION == "SVK", color2, color)) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 40, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Manufacturing

Table

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, LOCATION, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(value = B1GA_VC / B1_GE_VTOT) %>%
  filter(!is.na(value)) %>%
  group_by(LOCATION, Location) %>%
  summarise(year1 = first(year(date)),
            value1 = first(value),
            year2 = last(year(date)),
            value2 = last(value)) %>%
  mutate_at(vars(value1, value2), funs(round(100*., digits = 1))) %>%
  arrange(value2) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

France, Germany, US

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("FRA", "DEU", "USA"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Denmark, Switzerland, UK

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("GBR", "DNK", "CHE"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Spain, Italy, Portugal

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("PRT", "ESP", "ITA"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-7, 26, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

Norway, Sweden, Finland

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("NOR", "SWE", "FIN"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 40, 2),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")

South Korea, Australia, New Zealand

Code
SNA_TABLE6A %>%
  filter(TRANSACT %in% c("B1GA", "B1_GE"),
         ACTIVITY %in% c("VC", "VTOT"),
         LOCATION %in% c("KOR", "NZL", "AUS"),
         MEASURE == "C") %>%
  left_join(SNA_TABLE6A_var$LOCATION, by = "LOCATION") %>%
  year_to_date %>%
  mutate(VARIABLE = paste0(TRANSACT, "_", ACTIVITY)) %>%
  select(VARIABLE, Location, date, obsValue) %>%
  spread(VARIABLE, obsValue) %>%
  mutate(obsValue = B1GA_VC / B1_GE_VTOT) %>%
  na.omit %>%
  left_join(colors, by = c("Location" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() + add_3flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 40, 2),
                     labels = scales::percent_format(accuracy = 1)) +
  ylab("Value Added in Manufacturing (% of GDP)") + xlab("")