Government at a Glance - GOV

Data - OECD

Warning: le package 'choroplethr' n'est pas disponible for this version of R

Une version de ce package pour votre version de R est peut-être disponible ailleurs,
Voyez des idées à
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE, : aucun package nommé 'choroplethr' n'est trouvé

Info

Last observation: A: 2024 (N = 74)

First observation: A: 2002 (N = 38)

Last data update: 02 août 2026, 08:59. Last compile: 28 août 2026, 22:53

Structure

France, Germany

% of GDP

Code
GOV |>
  filter(COU %in% c("FRA", "DEU"),
         IND == "GINV_GDP") |>
  year_to_date() |>
  left_join(GOV_var$COU, by = "COU") |>
  ggplot() + geom_line(aes(x = date, y = obsValue/100, color = Cou)) + 
  theme_minimal() + ylab("Government investment (% of GDP)") + xlab("") +
  geom_image(data = . %>%
               filter(date == as.Date("2014-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", Cou)), ".png")),
             aes(x = date, y = obsValue/100, image = image), asp = 1.5) +
  scale_color_manual(values = c("#002395", "#000000")) +
  theme(legend.position = "none") +
  scale_x_date(breaks = seq(1920, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 0.2),
                     labels = scales::percent_format(accuracy = .1))

% of Expenditures

Code
GOV |>
  filter(COU %in% c("FRA", "DEU"),
         IND == "GINV_GTE") |>
  year_to_date() |>
  left_join(GOV_var$COU, by = "COU") |>
  ggplot() + geom_line(aes(x = date, y = obsValue/100, color = Cou)) + 
  theme_minimal() + ylab("Government investment (% of Expenditures)") + xlab("") +
  geom_image(data = . %>%
               filter(date == as.Date("2012-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", Cou)), ".png")),
             aes(x = date, y = obsValue/100, image = image), asp = 1.5) +
  scale_color_manual(values = c("#002395", "#000000")) +
  theme(legend.position = "none") +
  scale_x_date(breaks = seq(1920, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 0.5),
                     labels = scales::percent_format(accuracy = .1))

v