Total general government expenditure - tec00023

Data - Eurostat

geo

Code
tec00023 %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n(),
            `2020` = values[time == "2020" & sector == "S13"]) %>%
  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 .}

sector

Code
tec00023 %>%
  group_by(sector) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
sector Nobs
S13 395
S1311 395
S1312 395
S1313 395
S1314 395

Austria, Belgium, Bulgaria

Code
tec00023 %>%
  filter(geo %in% c("AT", "BE", "BG"),
         sector == "S13") %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  mutate(values = values / 100) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  + add_3flags + xlab("") + ylab("") + scale_color_identity() +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2024, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-30, 80, 2),
                labels = percent_format(a = 1))

France, Germany, Portugal

Code
tec00023 %>%
  filter(geo %in% c("FR", "DE", "PT"),
         sector == "S13") %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  mutate(values = values / 100) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  + add_3flags + xlab("") + ylab("") + scale_color_identity() +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2024, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-30, 80, 2),
                labels = percent_format(a = 1))

France, Germany, Spain, Italy, Netherlands

Code
tec00023 %>%
  filter(geo %in% c("FR", "DE", "ES", "IT", "NL"),
         sector == "S13") %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  mutate(values = values / 100) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  + add_5flags + xlab("") + ylab("") + scale_color_identity() +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2024, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-30, 80, 2),
                labels = percent_format(a = 1))