Turnover in industry, domestic market - monthly data - sts_intvd_m

Data - Eurostat

indic_bt

Code
sts_intvd_m %>%
  left_join(indic_bt, by = "indic_bt") %>%
  group_by(indic_bt, Indic_bt) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
indic_bt Indic_bt Nobs
TOVD Index of turnover - Domestic market 3980679

nace_r2

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

s_adj

Code
sts_intvd_m %>%
  left_join(s_adj, by = "s_adj") %>%
  group_by(s_adj, S_adj) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
s_adj S_adj Nobs
SCA Seasonally and calendar adjusted data 1522143
CA Calendar adjusted data, not seasonally adjusted data 1508616
NSA Unadjusted data (i.e. neither seasonally adjusted nor calendar adjusted data) 949920

unit

Code
sts_intvd_m %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
I15 Index, 2015=100 1197623
I21 Index, 2021=100 1070567
I10 Index, 2010=100 858412
PCH_PRE Percentage change on previous period 434896
PCH_SM Percentage change compared to same period in previous year 419181

geo

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

time

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

Germany - Different Industries

C10 - Manufacture of food products

Code
sts_intvd_m %>%
  filter(nace_r2 == "C10",
         unit == "I15",
         s_adj == "SCA",
         geo %in% c("DE")) %>%
  group_by(indic_bt) %>%
  mutate(values = 100*values/values[time == "2004M01"]) %>%
  left_join(indic_bt, by = "indic_bt") %>%
  month_to_date %>%
  filter(date <= as.Date("2020-07-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Indic_bt)) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(-60, 300, 10))

C20 - Manufacture of chemicals and chemical products

Code
sts_intvd_m %>%
  filter(nace_r2 == "C20",
         unit == "I15",
         s_adj == "SCA",
         geo %in% c("DE")) %>%
  group_by(indic_bt) %>%
  mutate(values = 100*values/values[time == "2004M01"]) %>%
  left_join(indic_bt, by = "indic_bt") %>%
  month_to_date %>%
  filter(date <= as.Date("2020-07-01"),
         date >= as.Date("2000-01-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Indic_bt)) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(-60, 300, 10))

C30 - Manufacture of other transport equipment

Code
sts_intvd_m %>%
  filter(nace_r2 == "C30",
         unit == "I15",
         s_adj == "SCA",
         geo %in% c("DE")) %>%
  group_by(indic_bt) %>%
  mutate(values = 100*values/values[time == "2004M01"]) %>%
  left_join(indic_bt, by = "indic_bt") %>%
  month_to_date %>%
  filter(date <= as.Date("2020-07-01"),
         date >= as.Date("2000-01-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Indic_bt)) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(-60, 300, 10))

Individual Countries

France

Code
sts_intvd_m %>%
  filter(nace_r2 == "C",
         unit == "I15",
         s_adj == "SCA",
         geo %in% c("FR")) %>%
  group_by(indic_bt) %>%
  mutate(values = 100*values/values[time == "2000M01"]) %>%
  left_join(indic_bt, by = "indic_bt") %>%
  month_to_date %>%
  filter(date <= as.Date("2020-07-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Indic_bt)) +
  scale_color_manual(values = c("#0055a4", "#000000", "#008c45")) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(-60, 300, 10))

Germany

All

Code
sts_intvd_m %>%
  filter(nace_r2 == "C",
         unit == "I15",
         s_adj == "SCA",
         geo %in% c("DE")) %>%
  group_by(indic_bt) %>%
  mutate(values = 100*values/values[time == "2004M01"]) %>%
  left_join(indic_bt, by = "indic_bt") %>%
  month_to_date %>%
  filter(date <= as.Date("2020-07-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Indic_bt)) +
  scale_color_manual(values = c("#0055a4", "#000000", "#008c45")) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(-60, 300, 10))

2000-

Code
sts_intvd_m %>%
  filter(nace_r2 == "C",
         unit == "I15",
         s_adj == "SCA",
         geo %in% c("DE")) %>%
  group_by(indic_bt) %>%
  mutate(values = 100*values/values[time == "2004M01"]) %>%
  left_join(indic_bt, by = "indic_bt") %>%
  month_to_date %>%
  filter(date <= as.Date("2020-07-01"),
         date >= as.Date("2000-01-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Indic_bt)) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(-60, 300, 10))

France, Germany, Italy

All

Code
sts_intvd_m %>%
  filter(nace_r2 == "C",
         unit == "I15",
         s_adj == "SCA",
         indic_bt == "TOVD",
         geo %in% c("FR", "DE", "IT")) %>%
  select(geo, time, values) %>%
  group_by(geo) %>%
  mutate(values = 100*values/values[time == "2000M01"]) %>%
  left_join(geo, by = "geo") %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
  month_to_date %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Geo)) +
  scale_color_manual(values = c("#0055a4", "#000000", "#008c45")) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2014-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(Geo), ".png")),
             aes(x = date, y = values, image = image), asp = 1.5) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(-60, 300, 10))

1995-

Code
sts_intvd_m %>%
  filter(nace_r2 == "C",
         unit == "I15",
         s_adj == "SCA",
         indic_bt == "TOVD",
         geo %in% c("FR", "DE", "IT")) %>%
  select(geo, time, values) %>%
  group_by(geo) %>%
  mutate(values = 100*values/values[time == "2000M01"]) %>%
  left_join(geo, by = "geo") %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
  month_to_date %>%
  filter(date >= as.Date("1995-01-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Geo)) +
  scale_color_manual(values = c("#0055a4", "#000000", "#008c45")) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2014-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(Geo), ".png")),
             aes(x = date, y = values, image = image), asp = 1.5) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(-60, 300, 5))

2000-

Code
sts_intvd_m %>%
  filter(nace_r2 == "C",
         unit == "I15",
         s_adj == "SCA",
         indic_bt == "TOVD",
         geo %in% c("FR", "DE", "IT")) %>%
  select(geo, time, values) %>%
  group_by(geo) %>%
  mutate(values = 100*values/values[time == "2000M01"]) %>%
  left_join(geo, by = "geo") %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
  month_to_date %>%
  filter(date >= as.Date("2000-01-01")) %>%
  ggplot() + ylab("Index of turnover - domestic market") + xlab("") + theme_minimal() +
  geom_line(aes(x = date, y = values, color = Geo)) +
  scale_color_manual(values = c("#0055a4", "#000000", "#008c45")) +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  geom_image(data = . %>%
               filter(date == as.Date("2014-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(Geo), ".png")),
             aes(x = date, y = values, image = image), asp = 1.5) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(-60, 300, 5))