Dépenses, recettes et besoin de financement des administrations publiques - valeurs aux prix courants - t_compteapu_val

Données - INSEE

Structure

column

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  group_by(column, operation, Line1, Line2, Operation) |>
  summarise(Nobs = n()) |>
  print_table_conditional()
column operation Line1 Line2 Operation Nobs
2 B9NF Capacité (+) ou besoin (-) de financement Capacité (+) ou besoin (-) de financement Capacité (+) ou besoin (-) de financement 310
4 DEPENSES Dépenses Dépenses Dépenses 186
5 P2 Dépenses Dépenses de fonctionnement Consommations intermédiaires 310
6 D1 Dépenses Dépenses de fonctionnement Rémunération des salariés 310
7 D122 Dépenses Dépenses de fonctionnement dont : Cotisations sociales imputées 310
8 D29, D4 hors D41, D5 Dépenses Dépenses de fonctionnement Autres dépenses de fonctionnement 310
9 D41 Dépenses Intérêts Intérêts 310
10 D62 Dépenses Prestations et transferts Prestations sociales autres que transferts sociaux en nature 310
11 D632 Dépenses Prestations et transferts Transferts sociaux en nature de produits marchands 310
12 D3 Dépenses Prestations et transferts Subventions 186
13 D7 Dépenses Prestations et transferts Autres transferts courants 310
14 D9 hors D995 Dépenses Prestations et transferts Transferts en capital 310
15 P51 Dépenses Acquisition nette d'actifs non financiers Formation brute de capital fixe 310
16 P52, P53, NP Dépenses Acquisition nette d'actifs non financiers Autres acquisitions nettes d'actifs non financiers 186
18 RECETTES Recettes Recettes Recettes 186
19 P1 partie Recettes Recettes de production Recettes de production hors subvention à la production 186
20 D39 Recettes Recettes de production Autres subventions sur la production 186
21 D41 Recettes Revenus de la propriété Intérêts 310
22 D4 hors D41 Recettes Revenus de la propriété Revenus de la propriété autres que les intérêts 310
23 D2 Recettes Impôts et cotisations sociales Impôts sur la production et les importations 310
24 D211 Recettes Impôts et cotisations sociales dont: Taxe sur la valeur ajoutée brute 310
25 D5 Recettes Impôts et cotisations sociales Impôts courants sur le revenu et le patrimoine 310
26 D91 Recettes Impôts et cotisations sociales Impôts en capital 310
27 D611+D613 Recettes Impôts et cotisations sociales Cotisations sociales effectives 310
28 D612 Recettes Impôts et cotisations sociales Cotisations sociales imputées 310
29 D995 Recettes Impôts et cotisations sociales Impôts et cotisations dus non recouvrables nets 194
30 D7 Recettes Autres transferts Autres transferts courants 310
31 D9 hors D91, D995 Recettes Autres transferts Transferts en capital 186
33 PIB PIB en valeur PIB en valeur PIB en valeur 310
34 B9NF/PIB Capacité (+) ou besoin (-) de financement (% de PIB) Capacité (+) ou besoin (-) de financement (% de PIB) Capacité (+) ou besoin (-) de financement (% de PIB) 310

Intérêts (% du PIB)

Tous

Code
t_compteapu_val |>
  filter(column %in% c(21, 9, 33)) |>
  spread(column, value) |>
  transmute(date,
         `Intérêts (dépenses)` = `9`/`33`,
         `Intérêts (recettes)` = `21`/`33`) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 100, .5),
                     labels = scales::percent_format(accuracy = .1))

1990-

Code
t_compteapu_val |>
  filter(column %in% c(21, 9, 33),
         date >= as.Date("1990-01-01")) |>
  spread(column, value) |>
  transmute(date,
         `Intérêts (dépenses)` = `9`/`33`,
         `Intérêts (recettes)` = `21`/`33`) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 100, .5),
                     labels = scales::percent_format(accuracy = .1))

2008-

Code
t_compteapu_val |>
  filter(column %in% c(21, 9, 33),
         date >= as.Date("2008-01-01")) |>
  spread(column, value) |>
  transmute(date,
         `Intérêts (dépenses)` = `9`/`33`,
         `Intérêts (recettes)` = `21`/`33`) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 100, .5),
                     labels = scales::percent_format(accuracy = .1))

Déficit public (% du PIB)

Déficit total

Code
t_compteapu_val |>
  filter(column %in% c(34)) |>
  transmute(date,
         value = value/100) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("Déficit Public (% du PIB)") + xlab("") +
  geom_line(aes(x = date, y = value)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

Déficit total, déficit primaire, charges d’intérêt

Tous

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB,
            `Charge d'intérêt` = B9NF/PIB - (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2005-

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2005-01-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB,
            `Charge d'intérêt` = B9NF/PIB - (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2008-2016

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2008-01-01"),
         date <= as.Date("2016-10-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB,
            `Charge d'intérêt` = B9NF/PIB - (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2015-

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2015-01-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB,
            `Charge d'intérêt` = B9NF/PIB - (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2017T2-

Code
df <- t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2017-04-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB,
            `Charge d'intérêt` = B9NF/PIB - (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  mutate(date = zoo::as.yearqtr(paste0(year(date), " Q", quarter(date))))

ggplot(data = df) + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.2)) +
  scale_x_yearqtr(labels = date_format("%Y T%q"),
                  breaks = seq(from = min(df$date), to = max(df$date), by = 0.5)) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2019-

Code
df <- t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2019-01-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB,
            `Charge d'intérêt` = B9NF/PIB - (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  mutate(date = zoo::as.yearqtr(paste0(year(date), " Q", quarter(date))))

ggplot(data = df) + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.2)) +
  scale_x_yearqtr(labels = date_format("%Y T%q"),
                  breaks = seq(from = min(df$date), to = max(df$date), by = 0.25)) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

Déficit total, déficit primaire

Tous

Code
df <- t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  mutate(date = zoo::as.yearqtr(paste0(year(date), " Q", quarter(date))))

ggplot(data = df) + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.2)) +
  scale_x_yearqtr(labels = date_format("%Y Q%q")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2005-

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2005-01-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2008-2016

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2008-01-01"),
         date <= as.Date("2016-10-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

2015-

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  select(date, variable, value) |>
  filter(variable %in% c("D41_d", "D41_r", "PIB", "B9NF")) |>
  filter(date >= as.Date("2015-01-01")) |>
  spread(variable, value) |>
  transmute(date,
            `Déficit total` = B9NF/PIB,
            `Déficit primaire` = (B9NF + D41_d-D41_r)/PIB) |>
  gather(variable, value, -date) |>
  filter(!is.na(value)) |>
  ggplot() + theme_minimal() + ylab("% du PIB") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = scales::percent_format(accuracy = 1))

Elasticité des recettes au PIB

1980-

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  filter(operation %in% c("PIB", "DEPENSES", "RECETTES")) |>
  select(operation, date, value) |>
  arrange(date) |>
  spread(operation, value) |>
  na.omit() |>
  mutate(DEPENSES_roll = rollsum(DEPENSES, k = 4, fill = NA),
         RECETTES_roll = rollsum(RECETTES, k = 4, fill = NA),
         PIB_roll = rollsum(PIB, k = 4, fill = NA)) |>
  mutate(croissance_PIB = PIB_roll/lag(PIB_roll, 4)-1,
         croissance_RECETTES = RECETTES_roll/lag(RECETTES_roll, 4)-1,
         croissance_DEPENSES = DEPENSES_roll/lag(DEPENSES_roll, 4)-1,
         `Elasticité des recettes` = croissance_RECETTES/croissance_PIB,
         `Elasticité des dépenses` = croissance_DEPENSES/croissance_PIB) |>
  select(date, `Elasticité des recettes`, `Elasticité des dépenses`) |>
  gather(variable, value, -date) |>
  ggplot() + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y"))

2010-

Code
t_compteapu_val |>
  left_join(variable, by = "column") |>
  filter(operation %in% c("PIB", "DEPENSES", "RECETTES")) |>
  select(operation, date, value) |>
  arrange(date) |>
  spread(operation, value) |>
  na.omit() |>
  mutate(DEPENSES_roll = rollsum(DEPENSES, k = 4, fill = NA),
         RECETTES_roll = rollsum(RECETTES, k = 4, fill = NA),
         PIB_roll = rollsum(PIB, k = 4, fill = NA)) |>
  mutate(croissance_PIB = PIB_roll/lag(PIB_roll, 4)-1,
         croissance_RECETTES = RECETTES_roll/lag(RECETTES_roll, 4)-1,
         croissance_DEPENSES = DEPENSES_roll/lag(DEPENSES_roll, 4)-1,
         `Elasticité des recettes` = croissance_RECETTES/croissance_PIB,
         `Elasticité des dépenses` = croissance_DEPENSES/croissance_PIB) |>
  select(date, `Elasticité des recettes`, `Elasticité des dépenses`) |>
  gather(variable, value, -date) |>
  filter(date >= as.Date("2010-01-01")) |>
  ggplot() + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y"))