General government expenditure by function (COFOG) - gov_10a_exp

Data - Eurostat

Info

Last observation: Annual: 2025 (N = 45,273)

First observation: Annual: 1990 (N = 15,325)

Last data update: 11 aoû 2026, 21:45. Last compile: 11 aoû 2026, 23:56

Structure

France vs germany

2022

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "MIO_EUR",
         sector == "S13",
         time == "2022",
         na_item == "TE",
         substr(cofog99, 1, 4) == "GF09") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  #select(-na_item) %>%
  spread(geo, values) |>
  print_table_conditional()
cofog99 Cofog99 Geo DE FR
GF09 Education France NA 134016.9
GF09 Education Germany 173973 NA
GF0901 Pre-primary and primary education France NA 36977.8
GF0901 Pre-primary and primary education Germany 57429 NA
GF0902 Secondary education France NA 58206.0
GF0902 Secondary education Germany 62643 NA
GF0903 Post-secondary non-tertiary education France NA 1041.1
GF0903 Post-secondary non-tertiary education Germany 2730 NA
GF0904 Tertiary education France NA 12430.1
GF0904 Tertiary education Germany 30522 NA
GF0905 Education not definable by level France NA 8636.6
GF0905 Education not definable by level Germany 3121 NA
GF0906 Subsidiary services to education France NA 16124.9
GF0906 Subsidiary services to education Germany 14590 NA
GF0907 R&D Education France NA 4.1
GF0907 R&D Education Germany 597 NA
GF0908 Education n.e.c. France NA 596.4
GF0908 Education n.e.c. Germany 2341 NA

2021

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "MIO_EUR",
         sector == "S13",
         time == "2021",
         na_item == "TE",
         substr(cofog99, 1, 4) == "GF09") %>%
  select_if(~ n_distinct(.) > 1) |>
  
  #select(-na_item) %>%
  spread(geo, values) |>
  print_table_conditional()
cofog99 Cofog99 Geo DE FR
GF09 Education France NA 127071.8
GF09 Education Germany 163730 NA
GF0901 Pre-primary and primary education France NA 35093.0
GF0901 Pre-primary and primary education Germany 54444 NA
GF0902 Secondary education France NA 55476.9
GF0902 Secondary education Germany 59960 NA
GF0903 Post-secondary non-tertiary education France NA 905.1
GF0903 Post-secondary non-tertiary education Germany 2597 NA
GF0904 Tertiary education France NA 11335.7
GF0904 Tertiary education Germany 27989 NA
GF0905 Education not definable by level France NA 8046.8
GF0905 Education not definable by level Germany 2766 NA
GF0906 Subsidiary services to education France NA 15590.7
GF0906 Subsidiary services to education Germany 13467 NA
GF0907 R&D Education France NA 5.2
GF0907 R&D Education Germany 323 NA
GF0908 Education n.e.c. France NA 618.4
GF0908 Education n.e.c. Germany 2184 NA

Germany VS France

General Public Services - TOTAL

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "PC_GDP",
         sector == "S13",
         cofog99 == "TOTAL",
         na_item == "TE") |>
  year_to_date() |>
  select(date, geo, Geo, na_item, values) |>
  
  mutate(values = values / 100) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  + add_flags + xlab("") + ylab("") + scale_color_identity() +
  scale_x_date(breaks = as.Date(paste0(seq(1960,2100,  5), "-01-01")),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-30, 80, 2),
                labels = percent_format(a = 1))

GF09

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "PC_GDP",
         sector == "S13",
         cofog99 == "GF09",
         na_item == "TE") |>
  year_to_date() |>
  select(date, geo, Geo, na_item, values) |>
  
  mutate(values = values / 100) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  + add_flags + xlab("") + ylab("") + scale_color_identity() +
  scale_x_date(breaks = as.Date(paste0(seq(1960,2100,  5), "-01-01")),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-30, 80, 0.2),
                labels = percent_format(a = .1))

GF09

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "MIO_EUR",
         sector == "S13",
         cofog99 == "GF09",
         na_item == "TE") |>
  year_to_date() |>
  select(date, geo, Geo, na_item, values) |>
  
  mutate(values = values / 1000) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  + add_flags + xlab("") + ylab("") + scale_color_identity() +
  scale_x_date(breaks = as.Date(paste0(seq(1960,2100,  5), "-01-01")),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(-30, 300, 10))

Germany VS France

General Public Services - TOTAL

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "MIO_EUR",
         sector == "S13",
         cofog99 == "TOTAL",
         na_item %in% c("P5", "TE")) |>
  year_to_date() |>
  select(date, geo, Geo, na_item, values) |>
  spread(na_item, values) |>
  
  mutate(values = P5 / TE) |>
  ggplot() + geom_line(aes(x = date, y = values, color = Geo)) +
  theme_minimal()  +
  scale_x_date(breaks = as.Date(paste0(seq(1960,2100,  5), "-01-01")),
               labels = date_format("%Y")) +
  add_flags +
  scale_color_manual(values = c("#002395", "#000000")) +
  theme(legend.position = "none") +
  xlab("") + ylab("Eurostat (P5 / TE de gov_10a_exp)") +
  scale_y_continuous(breaks = 0.01*seq(-30, 30, 1),
                labels = percent_format(a = 1))

Germany VS France

GF09

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "PC_TOT",
         sector == "S13",
         cofog99 == "GF09",
         na_item == "P5") |>
  year_to_date() |>
  
  mutate(values = values / 100) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  +
  scale_x_date(breaks = as.Date(paste0(seq(1960,2100,  5), "-01-01")),
               labels = date_format("%Y")) +
  scale_color_identity() + add_flags +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("GF01 - Services généraux des admin pub") +
  scale_y_continuous(breaks = 0.01*seq(-30, 30, 1),
                labels = percent_format(a = 1))

General Public Services - GF01

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "PC_TOT",
         sector == "S13",
         cofog99 == "GF01",
         na_item == "P5") |>
  year_to_date() |>
  
  mutate(values = values / 100) |>
  left_join(colors, by = c("Geo" = "country")) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal()  +
  scale_x_date(breaks = as.Date(paste0(seq(1960,2100,  5), "-01-01")),
               labels = date_format("%Y")) +
  scale_color_identity() + add_flags +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("GF01 - Services généraux des admin pub") +
  scale_y_continuous(breaks = 0.01*seq(-30, 30, 1),
                labels = percent_format(a = 1))

2-digit

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "PC_TOT",
         time == "2019",
         sector == "S13",
         nchar(cofog99) == 4,
         na_item == "P5") |>
  
  
  select(Geo, cofog99, Cofog99, values) |>
  mutate(Geo = gsub(" ", "-", str_to_lower(gsub(" ", "-", Geo))),
         Geo = paste0('<img src="../../icon/flag/vsmall/', Geo, '.png" alt="Flag">')) |>
  spread(Geo, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

4-digit

Code
gov_10a_exp |>
  filter(geo %in% c("FR", "DE"),
         unit == "PC_TOT",
         time == "2019",
         sector == "S13",
         na_item == "P5") |>
  
  
  select(Geo, cofog99, Cofog99, values) |>
  mutate(Geo = gsub(" ", "-", str_to_lower(gsub(" ", "-", Geo))),
         Geo = paste0('<img src="../../icon/flag/vsmall/', Geo, '.png" alt="Flag">')) |>
  spread(Geo, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}