3.201 – Dépenses et recettes des administrations publiques (S13) (En milliards d’euros)

Data - INSEE

Info

source dataset .html .RData
insee T_3201 2024-12-22 2024-10-17

LAST_COMPILE

LAST_COMPILE
2024-12-22

Dernière

Code
T_3201 %>%
  group_by(year) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(year)) %>%
  head(2) %>%
  print_table_conditional()
year Nobs
2023 50
2022 50

Last Year

Ordre Ligne

Code
T_3201 %>%
  filter(year == max(year)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  select(-date) %>%
  mutate(value_gdp = round(100*value/gdp, 1)) %>%
  select(-gdp) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Ordre décroissant

Code
T_3201 %>%
  filter(year == max(year)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  select(-date) %>%
  mutate(value_gdp = round(100*value/gdp, 1)) %>%
  select(-gdp) %>%
  arrange(-value) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Retraites VS salaires des fonctionnaires -cotisations sociales imputées

Tous

Code
T_3201 %>%
  filter(line %in% c(3, 20, 10)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Prestations sociales autres que transferts sociaux en nature` = `10`,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank())

Dépenses, Salaires, salaires-cotisations sociales imputées

Tous

Code
T_3201 %>%
  filter(line %in% c(3, 20, 1, 19)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Dépenses publiques` = `19`,
            `Dépenses de fonctionnement` = `1`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(Line = gsub(" -- ", "\n", Line)) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 5),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = "none",
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date %in% c(max(date), min(date))),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain") +
  geom_label(data = . %>% filter(date %in% as.Date("1995-01-01")),
                  aes(x = date, y = value/gdp, label = Line, color = Line), 
                  fontface ="plain")

1979-

Code
T_3201 %>%
  filter(line %in% c(3, 20, 1, 19)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1979-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date == max(date)),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

1995-

Code
T_3201 %>%
  filter(line %in% c(3, 20, 1, 19)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1995-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date == max(date)),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

1997-

Code
T_3201 %>%
  filter(line %in% c(3, 20, 1, 19)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1997-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1997, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date %in% c(max(date), min(date))),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

Salaires, salaires-cotisations sociales imputées

Tous

Code
T_3201 %>%
  filter(line %in% c(3, 20)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.5),
        legend.title = element_blank())

1979-

Code
T_3201 %>%
  filter(line %in% c(3, 20)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1979-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date == max(date)),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

1995-

Code
T_3201 %>%
  filter(line %in% c(3, 20)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1995-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date == max(date)),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

1997-

Code
T_3201 %>%
  filter(line %in% c(3, 20)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1997-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1997, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date %in% c(max(date), min(date))),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

Dépenses de fonctionnement, total

Tous

Code
T_3201 %>%
  filter(line %in% c(1, 19)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 5),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.5),
        legend.title = element_blank())

1978-

Code
T_3201 %>%
  filter(line %in% c(1, 19)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1978-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 5),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.5),
        legend.title = element_blank())

1995-

Code
T_3201 %>%
  filter(line %in% c(1, 19)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1995-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 5),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.5),
        legend.title = element_blank())

Dépenses de fonctionnement sans cotisations sociales imputées

1995-

Code
T_3201 %>%
  filter(line %in% c(1, 20)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Dépenses de fonctionnement ` = `1`,
            `Dépenses de fonctionnement  -- sans cotisations sociales imputées` = `1`-`20`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1995-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date == max(date)),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

Dépenses de fonctionnement

Tous

Code
T_3201 %>%
  filter(line %in% c(1)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Dépenses de fonctionnement (% du PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1979-

Code
T_3201 %>%
  filter(line %in% c(1)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1979-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Dépenses de fonctionnement (% du PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Dépenses publiques

Tous

Code
T_3201 %>%
  filter(line %in% c(19)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1979-

Code
T_3201 %>%
  filter(line %in% c(19)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1979-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

2000-

Code
T_3201 %>%
  filter(line %in% c(19)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("2000-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Recettes publiques

Tous

Code
T_3201 %>%
  filter(line %in% c(44)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1979-

Code
T_3201 %>%
  filter(line %in% c(44)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1979-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

2000-

Code
T_3201 %>%
  filter(line %in% c(44)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("2000-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Charges d’intérêt

Tous

Code
T_3201 %>%
  filter(line %in% c(7)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Hors correction au titre des services d’intermédiation financière indirectement mesurés

Code
T_3201 %>%
  filter(line %in% c(8)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  add_row(date = as.Date("2022-01-01"), value = 53.2, gdp = 2643) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Charge d'intérêts hors correction au titre des SIFIM\n% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Les deux

Code
T_3201 %>%
  filter(line %in% c(8, 7)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("Intérêts (% du PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.5),
                labels = percent_format(accuracy = .1)) +
  theme(legend.position = c(0.45, 0.85),
        legend.title = element_blank())

Déficit public

Capacité ou besoin de financement

Code
T_3201 %>%
  filter(line %in% c(50)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  #add_row(date = as.Date("2022-01-01"), value = -124.9, gdp = 2643) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Déficit public (% du PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Impôts et cotisations sociales

Tous

Code
T_3201 %>%
  filter(line %in% c(33)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1979-

Code
T_3201 %>%
  filter(line %in% c(33)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("1979-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Impôts et cotisations sociales (% du PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

2000-

Code
T_3201 %>%
  filter(line %in% c(33)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  filter(date >= as.Date("2000-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Impôts et cotisations sociales (% du PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Consommations intermédiaires, Salaires, salaires-cotisations sociales imputées

Tous

% du PIB

Code
T_3201 %>%
  filter(line %in% c(3, 20, 2)) %>%
  select(line,year, value) %>%
  spread(line, value) %>%
  transmute(year,
            `Rémunération des salariés` = `3`,
            `Rémunération des salariés -- sans cotisations sociales imputées` = `3`-`20`,
            `Consommations intermédiaires` = `2`) %>%
  gather(Line, value, -year) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.6, 0.5),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date %in% c(max(date), min(date), as.Date("1995-01-01"))),
                  aes(x = date, y = value/gdp, label = percent(value / gdp, 0.1), color = Line), 
                  fontface ="plain")

Salaires, consommations intermédiaires

Tous

Code
T_3201 %>%
  filter(line %in% c(1, 2, 3)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value/gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1),
                limits = c(0, 0.21)) +
  theme(legend.position = c(0.4, 0.14),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date %in% c(max(date), min(date))),
             aes(x = date, y = value_gdp, color = Line, label = percent(value_gdp, acc = 0.1)))

1979-

Code
T_3201 %>%
  filter(line %in% c(1, 2, 3)) %>%
  year_to_date2 %>%
  filter(date >= as.Date("1979-01-01")) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value/gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1),
                limits = c(0, 0.21)) +
  theme(legend.position = c(0.4, 0.14),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date %in% c(max(date), min(date))),
             aes(x = date, y = value_gdp, color = Line, label = percent(value_gdp, acc = 0.1)))

1995-

Code
T_3201 %>%
  filter(line %in% c(1, 2, 3)) %>%
  year_to_date2 %>%
  filter(date >= as.Date("1995-01-01")) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value/gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1),
                limits = c(0, 0.21)) +
  theme(legend.position = c(0.4, 0.14),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(date %in% c(max(date), min(date))),
             aes(x = date, y = value_gdp, color = Line, label = percent(value_gdp, acc = 0.1)))

Dépenses publiques

Tous sans cotisations

Code
T_3201 %>%
  filter(line %in% c(44, 48)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value/gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(max(date) == date), aes(x = date, y = value_gdp, label = percent(value_gdp, acc = 0.1)))

Dépenses avec et sans double comptes

Code
T_3201 %>%
  filter(line %in% c(19, 23)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value/gdp) %>%
  mutate(Line = ifelse(line == 23, "Total des dépenses hors éléments imputés", Line)) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("Dépenses publiques (points de PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 2),
                labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_label(data = . %>% filter(max(date) == date), aes(x = date, y = value_gdp, label = percent(value_gdp, acc = 0.1)))

Tous sans cotisations

Code
T_3201 %>%
  filter(line %in% c(44, 48)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("% du PIB") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 1),
                labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Cotisations sociales imputées

Tous

Code
T_3201 %>%
  filter(line %in% c(20)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Cotisations sociales imputées (% du PIB)") +
  scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 0.1),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

Depenses sans et avec

Code
T_3201 %>%
  filter(line %in% c(20, 19)) %>%
  year_to_date2 %>%
  select(-Line) %>%
  spread(line, value) %>%
  transmute(date,
            `Total des dépenses` = `19`,
            `Total des dépenses hors cotisations sociales imputées` = `19`-`20`) %>%
  gather(Line, value, -date) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Line)) +
  theme_minimal() + xlab("") + ylab("Points de PIB") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 500, 2),
                labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.7, 0.15),
        legend.title = element_blank())+
  geom_text(data = . %>% filter(max(date) == date),
             aes(x = date, y = value_gdp, label = percent(value_gdp, acc = 0.1)))