7.301 – Compte des administrations publiques (S13) (En milliards d’euros)

Data - INSEE

Info

source dataset .html .RData
insee T_7301 2024-11-05 2024-10-17

Info

  • Comptes de la Nation 2022. html / xlsx

  • Comptes de la Nation 2020. html

  • Revenu et pouvoir d’achat des ménages en 2018. html

Dernière

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

Last Year

Ordre Ligne

Code
T_7301 %>%
  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_7301 %>%
  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 .}

gdp

Code
gdp %>%
  mutate(gdp = round(gdp) %>% paste0(" Mds€")) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Table

2022

Code
T_7301 %>%
  filter(year == "2022") %>%
  select(-year) %>%
  mutate(value = round(value) %>% paste0(" Mds€")) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

2018

Code
T_7301 %>%
  filter(year == "2018") %>%
  select(-year) %>%
  mutate(value = round(value) %>% paste0(" Mds€")) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Ensemble des administrations publiques

B1G - Investissement

% du PIB

Tous

Code
T_7301 %>%
  filter(variable %in% c("P51C", "P51G")) %>%
  select(year, variable, value) %>%
  spread(variable, value) %>%
  transmute(year,
            `Investissement brut` = P51G,
            `Investissement net` = P51G-P51C) %>%
  gather(Variable, value, -year) %>%
  year_to_date2 %>%
  arrange(desc(date)) %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Variable)) +
  theme_minimal() + xlab("") + ylab("Investissement (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1978-

Code
T_7301 %>%
  filter(variable %in% c("P51C", "P51G"),
         year >= 1978) %>%
  select(year, variable, value) %>%
  spread(variable, value) %>%
  transmute(year,
            `Investissement brut` = P51G,
            `Investissement net` = P51G-P51C) %>%
  gather(Variable, value, -year) %>%
  year_to_date2 %>%
  arrange(desc(date)) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Variable)) +
  theme_minimal() + xlab("") + ylab("Investissement (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

1990-

Code
T_7301 %>%
  filter(variable %in% c("P51C", "P51G"),
         year >= 1990) %>%
  select(year, variable, value) %>%
  spread(variable, value) %>%
  transmute(year,
            `Investissement brut` = P51G,
            `Investissement net` = P51G-P51C) %>%
  gather(Variable, value, -year) %>%
  year_to_date2 %>%
  arrange(desc(date)) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Variable)) +
  theme_minimal() + xlab("") + ylab("Investissement (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

B1G - Valeur ajoutée brute

% du PIB

Tous

Code
T_7301 %>%
  filter(variable %in% c("B1G"),
         line == 6) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1978-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B1G"),
         date >= as.Date("1978-01-01"),
         line == 6) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

1990-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B1G"),
         date >= as.Date("1990-01-01"),
         line == 6) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

2000-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B1G"),
         date >= as.Date("2000-01-01"),
         line == 6) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

2007-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B1G"),
         date >= as.Date("2007-01-01"),
         line == 6) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

Capacité ou besoin de financement

Milliards

Tous

Code
T_7301 %>%
  filter(variable %in% c("B9")) %>%
  year_to_date2 %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = value)) +
  scale_x_date(breaks = seq(1945, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(-900, 900, 20),
                     labels = scales::dollar_format(pre = "", su = " Md€"))

2000-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B9"),
         date >= as.Date("2000-01-01")) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = value)) +
  scale_x_date(breaks = seq(2000, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(-900, 900, 20),
                     labels = scales::dollar_format(pre = "", su = " Md€")) +
  geom_text_repel(aes(x = date, y = value, label = value %>% round(., 1) %>% paste0(., "Md€")),
                  fontface ="plain", size = 3)

% du PIB

Tous

Code
T_7301 %>%
  filter(variable %in% c("B9")) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp)) +
  theme_minimal() + xlab("") + ylab("Déficit public (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1978-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B9"),
         date >= as.Date("1978-01-01")) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Déficit public (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

1990-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B9"),
         date >= as.Date("1990-01-01")) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Déficit public (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

2000-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B9"),
         date >= as.Date("2000-01-01")) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Déficit public (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

2007-

Code
T_7301 %>%
  year_to_date2 %>%
  filter(variable %in% c("B9"),
         date >= as.Date("2007-01-01")) %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Déficit public (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

Deux tables

B1G - Valeur ajoutée brute

% du PIB

Tous

Code
T_7301 %>%
  filter(variable %in% c("B1G"),
         line == 6) %>%
  bind_rows(T_3201 %>%
              filter(line == 1) %>%
              transmute(Variable = Line, line, year, value)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp, color = Variable)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, 1),
                labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank())

1978-

Code
T_7301 %>%
  filter(variable %in% c("B1G"),
         line == 6) %>%
  bind_rows(T_3201 %>%
              filter(line == 1) %>%
              transmute(Variable = Line, line, year, value)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  filter(date >= as.Date("1978-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Variable)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.9),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

1990-

Code
T_7301 %>%
  filter(variable %in% c("B1G"),
         line == 6) %>%
  bind_rows(T_3201 %>%
              filter(line == 1) %>%
              transmute(Variable = Line, line, year, value)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Variable)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.75, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

2000-

Code
T_7301 %>%
  filter(variable %in% c("B1G"),
         line == 6) %>%
  bind_rows(T_3201 %>%
              filter(line == 1) %>%
              transmute(Variable = Line, line, year, value)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  filter(date >= as.Date("2000-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Variable)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée brute (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.6, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)

2007-

Code
T_7301 %>%
  filter(variable %in% c("B1G"),
         line == 6) %>%
  bind_rows(T_3201 %>%
              filter(line == 1) %>%
              transmute(Variable = Line, line, year, value)) %>%
  year_to_date2 %>%
  left_join(gdp, by = "date") %>%
  mutate(value_gdp = value / gdp) %>%
  filter(date >= as.Date("2007-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value_gdp, color = Variable)) +
  geom_point(aes(x = date, y = value_gdp)) +
  theme_minimal() + xlab("") + ylab("Valeur ajoutée (% du PIB)") +
  scale_x_date(breaks = seq(1940, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-20, 500, .2),
                labels = percent_format(accuracy = .1)) +
  
  theme(legend.position = c(0.35, 0.15),
        legend.title = element_blank()) +
  geom_text_repel(aes(x = date, y = value_gdp, label = value_gdp %>% percent(., 0.1)),
                  fontface ="plain", size = 3)