Récapitulatif des séries des comptes d’agents

Data - Insee

Info

source dataset .html .RData
insee t_recapAgent_val 2024-10-29 2024-09-02

Données

  • Comptes nationaux trimestriels au 4ème trimestre 2023. [html] / [xls]

Données sur le pouvoir d’achat

source dataset .html .RData
insee CNA-2014-RDB 2024-11-05 2024-11-05
insee CNT-2014-CSI 2024-11-05 2024-11-05
insee conso-eff-fonction 2024-11-05 2022-06-14
insee econ-gen-revenu-dispo-pouv-achat-2 2024-11-05 2024-07-05
insee reve-conso-evo-dep-pa 2024-11-05 2024-09-05
insee reve-niv-vie-individu-activite 2024-11-05 NA
insee reve-niv-vie-pouv-achat-trim 2024-11-05 2024-09-05
insee T_7401 2024-10-18 2024-10-18
insee t_men_val 2024-11-05 2024-09-02
insee t_pouvachat_val 2024-11-05 2024-09-04
insee t_recapAgent_val 2024-10-29 2024-09-02
insee t_salaire_val 2024-11-03 2024-09-02
oecd HH_DASH 2024-09-15 2023-09-09

LAST_COMPILE

LAST_COMPILE
2024-11-05

date

Code
t_recapAgent_val %>%
  group_by(date) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(date)) %>%
  print_table_conditional

2017T2-

Table

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(date %in% c(as.Date("2017-04-01"), max(date) - months(3), max(date))) %>%
  spread(date, value) %>%
  print_table_conditional(.)

D41 - Intérêts

2017T2-

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D41") %>%
  filter(date %in% c(as.Date("2017-04-01"), max(date) - months(3), max(date))) %>%
  spread(date, value) %>%
  print_table_conditional(.)
sheet column Compte operation Operation1 Operation2 2017-04-01 2024-01-01 2024-04-01
APU 24 Compte d'affectation des revenus primaires D41 Reçu Intérêts 0.343 0.964 0.884
APU 28 Compte d'affectation des revenus primaires D41 Versé Intérêts 10.194 13.464 13.895
ISBLSM 16 Compte d'affectation des revenus primaires D41 Reçu Intérêts 0.151 0.803 0.681
ISBLSM 18 Compte d'affectation des revenus primaires D41 Versé Intérêts 0.042 0.135 0.102
Menages 42 Compte d'affectation des revenus primaires D41 Reçu Intérêts 2.869 21.465 20.284
Menages 46 Compte d'affectation des revenus primaires D41 Versé Intérêts 2.876 18.429 17.348
RdM 10 NA D41 En provenance du reste du monde Intérêts 13.578 42.837 42.904
RdM 31 NA D41 à destination du reste du monde Intérêts 14.979 50.137 49.641
SF 17 Compte d'affectation des revenus primaires D41 Reçu Intérêts 36.376 132.695 132.619
SF 21 Compte d'affectation des revenus primaires D41 Versé Intérêts 24.726 117.917 115.368
SNF 17 Compte d'affectation des revenus primaires D41 Reçu Intérêts 14.688 43.457 42.752
SNF 22 Compte d'affectation des revenus primaires D41 Versé Intérêts 17.989 56.739 57.244

2021T2-

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D41") %>%
  filter(date %in% c(as.Date("2021-04-01"), max(date))) %>%
  spread(date, value) %>%
  print_table_conditional(.)
sheet column Compte operation Operation1 Operation2 2021-04-01 2024-04-01
APU 24 Compte d'affectation des revenus primaires D41 Reçu Intérêts 0.136 0.884
APU 28 Compte d'affectation des revenus primaires D41 Versé Intérêts 7.858 13.895
ISBLSM 16 Compte d'affectation des revenus primaires D41 Reçu Intérêts 0.124 0.681
ISBLSM 18 Compte d'affectation des revenus primaires D41 Versé Intérêts 0.028 0.102
Menages 42 Compte d'affectation des revenus primaires D41 Reçu Intérêts 2.025 20.284
Menages 46 Compte d'affectation des revenus primaires D41 Versé Intérêts 1.953 17.348
RdM 10 NA D41 En provenance du reste du monde Intérêts 12.359 42.904
RdM 31 NA D41 à destination du reste du monde Intérêts 11.083 49.641
SF 17 Compte d'affectation des revenus primaires D41 Reçu Intérêts 30.476 132.619
SF 21 Compte d'affectation des revenus primaires D41 Versé Intérêts 20.847 115.368
SNF 17 Compte d'affectation des revenus primaires D41 Reçu Intérêts 16.202 42.752
SNF 22 Compte d'affectation des revenus primaires D41 Versé Intérêts 17.002 57.244

D42 - Dividendes

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D42") %>%
  filter(date %in% c(as.Date("2017-04-01"), max(date) - months(3), max(date))) %>%
  spread(date, value) %>%
  print_table_conditional(.)
sheet column Compte operation Operation1 Operation2 2017-04-01 2024-01-01 2024-04-01
APU 25 Compte d'affectation des revenus primaires D42 Reçu Dividendes 2.017 1.594 1.615
Menages 43 Compte d'affectation des revenus primaires D42 Reçu Dividendes 8.096 17.410 17.516
RdM 11 NA D42 En provenance du reste du monde Dividendes 13.900 26.027 26.176
RdM 32 NA D42 à destination du reste du monde Dividendes 11.211 20.331 20.428
SF 18 Compte d'affectation des revenus primaires D42 Reçu Dividendes 12.135 21.484 21.700
SF 22 Compte d'affectation des revenus primaires D42 Versé Dividendes 10.339 16.155 16.421
SNF 18 Compte d'affectation des revenus primaires D42 Reçu Dividendes 37.506 48.642 49.230
SNF 23 Compte d'affectation des revenus primaires D42 Versé Dividendes 46.726 67.279 67.890

B9NF - Besoin (-) ou Capacité (+) de financement

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  filter(date %in% c(as.Date("2017-04-01"), max(date) - months(3), max(date))) %>%
  spread(date, value) %>%
  print_table_conditional(.)
sheet column Compte operation Operation1 Operation2 2017-04-01 2024-01-01 2024-04-01
APU 64 Compte de capital B9NF Besoin (-) ou Capacité (+) de financement NA -17.853 -40.248 -39.783
ISBLSM 35 Compte de capital B9NF Besoin (-) ou Capacité (+) de financement NA 0.071 0.434 0.352
Menages 78 Compte de capital B9NF Besoin (-) ou Capacité (+) de financement NA 14.438 37.441 39.488
RdM 50 NA B9NF Besoin (-) ou Capacité(+) de financement de la Nation NA -2.934 -0.998 -0.921
SF 52 Compte de capital B9NF Besoin (-) ou Capacité (+) de financement NA -1.704 -1.163 2.072
SNF 46 Compte de capital B9NF Besoin (-) ou Capacité (+) de financement NA 2.114 2.538 -3.050

B9NF - Besoin (-) ou Capacité (+) de financement

Tous

Md€

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  ggplot + geom_line(aes(x = date, y = value, color = paste0(sheet, " - ", Operation1))) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(-200, 100, 10),
                labels = dollar_format(pre = "", su = " Md€")) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank())

% du PIB

Tous

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

2000

Basique
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2000-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "2 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

Autre division
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2000-01-01")) %>%
  transmute(date, value = value/gdp, sheet) %>%
  spread(sheet, value) %>%
  transmute(date, `Administrations Publiques` = `APU`, `Sociétés (SNF + SF)` = SNF + SF, `Ménages` = Menages) %>%
  gather(sheet, value, -date) %>%
  ggplot + geom_line(aes(x = date, y = value, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "2 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.35, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

2007-

Basique
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2007-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "2 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

Autre division
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2007-01-01")) %>%
  transmute(date, value = value/gdp, sheet) %>%
  spread(sheet, value) %>%
  transmute(date, `Administrations Publiques` = `APU`, `Sociétés (SNF + SF)` = SNF + SF, `Ménages` = Menages) %>%
  gather(sheet, value, -date) %>%
  ggplot + geom_line(aes(x = date, y = value, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "1 year"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.35, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

2013-

Basique
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2013-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("2013-01-01"), to = as.Date("2100-10-01"), by = "1 year"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

Autre division
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2013-01-01")) %>%
  transmute(date, value = value/gdp, sheet) %>%
  spread(sheet, value) %>%
  transmute(date, `Administrations Publiques` = `APU`, `Sociétés (SNF + SF)` = SNF + SF, `Ménages` = Menages) %>%
  gather(sheet, value, -date) %>%
  ggplot + geom_line(aes(x = date, y = value, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "1 year"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.35, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

2017-

Basique
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2017-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("2017-01-01"), to = as.Date("2100-10-01"), by = "1 year"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

Autre division
Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "B9NF") %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2017-01-01")) %>%
  transmute(date, value = value/gdp, sheet) %>%
  spread(sheet, value) %>%
  transmute(date, `Administrations Publiques` = `APU`, `Sociétés (SNF + SF)` = SNF + SF, `Ménages` = Menages) %>%
  gather(sheet, value, -date) %>%
  ggplot + geom_line(aes(x = date, y = value, color = sheet)) +
  xlab("") + ylab("Besoin (-) ou Capacité (+) de financement (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "1 year"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.35, 0.84),
        legend.title = element_blank(),
        legend.direction = "horizontal")

D42 - Dividendes

Tous

Md€

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D42") %>%
  ggplot + geom_line(aes(x = date, y = value, color = paste0(sheet, " - ", Operation1))) +
  xlab("") + ylab("") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(-10, 100, 10),
                labels = dollar_format(pre = "", su = " Md€")) +
  theme(legend.position = c(0.3, 0.7),
        legend.title = element_blank())

% du PIB

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D42") %>%
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = paste0(sheet, " - ", Operation1))) +
  xlab("") + ylab("") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 1),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.2, 0.7),
        legend.title = element_blank())

Nets

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D42") %>%
  transmute(date, value, Variable =  paste0(sheet, " - ", Operation1)) %>%
  spread(Variable, value) %>%
  transmute(date,
            `Administrations Publiques: Reçu` = `APU - Reçu`,
            `Ménages: Reçu` = `Menages - Reçu`,
            `Reste du Monde: En provenance - à destination` = `RdM - En provenance du reste du monde` - `RdM - à destination du reste du monde`,
            `Sociétés Financières: Reçu - Versé` = `SF - Reçu` - `SF - Versé`,
            `Sociétés Non Financières: Reçu - Versé` = `SNF - Reçu` - `SNF - Versé`) %>%
  gather(Variable, value, -date) %>%
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = Variable)) +
  xlab("") + ylab("") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, .5),
                labels = percent_format(acc = .1)) +
  theme(legend.position = c(0.5, 0.88),
        legend.title = element_blank())

D42, D44

% du PIB

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("D42", "D44"),
         sheet == "Menages") %>%
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = Operation2)) +
  xlab("") + ylab("Dividendes reçus, Ménages (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 0.1),
                labels = percent_format(acc = 0.1)) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

Mds€

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("D42", "D44"),
         sheet == "Menages") %>%
  ggplot + geom_line(aes(x = date, y = value, color = Operation2)) +
  xlab("") + ylab("Dividendes reçus, Ménages") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 1000, 2)) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

1999

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("D42", "D44", "B6", "D11"),
         sheet == "Menages") %>%
  filter(date >= as.Date("1999-01-01")) %>%
  group_by(Operation2) %>%
  arrange(date) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot + geom_line(aes(x = date, y = value, color = paste0(Operation1, Operation2))) +
  xlab("") + ylab("Dividendes reçus, Ménages") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 1000, 100)) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

1999

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("D51", "D611", "D613"),
         sheet == "Menages") %>%
  filter(date >= as.Date("1999-01-01")) %>%
  group_by(Operation2) %>%
  arrange(date) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot + geom_line(aes(x = date, y = value, color = paste0(Operation1, Operation2))) +
  xlab("") + ylab("Dividendes reçus, Ménages") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 1000, 10)) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank())

B2 (y compris B3)

1999-

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("B2 (y compris B3)"),
         sheet == "Menages") %>%
  filter(date >= as.Date("1999-01-01")) %>%
  group_by(Operation2) %>%
  arrange(date) %>%
  mutate(value_index = 100*value/value[1]) %>%
  ggplot + geom_line(aes(x = date, y = value_index, color = paste0(Operation2))) +
  xlab("") + ylab("") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 1000, 10)) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  geom_label_repel(data = . %>% filter(date == max(date) | date == min(date)),
                   aes(x = date, y = value_index, label = round(value), color = Operation2))

2017-

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("B2 (y compris B3)"),
         sheet == "Menages") %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Operation2) %>%
  arrange(date) %>%
  mutate(value_index = 100*value/value[1]) %>%
  ggplot + geom_line(aes(x = date, y = value_index, color = Operation2)) +
  xlab("") + ylab("") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "1 year"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 1000, 5)) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  geom_label_repel(data = . %>% filter(date == max(date) | date == min(date)),
                   aes(x = date, y = value_index, label = round(value), color = Operation2))

Comptes des ménages

Dividendes

Md€

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D42",
         sheet == "Menages") %>%
  ggplot + geom_line(aes(x = date, y = value, color = paste0(sheet, " - ", Operation1))) +
  xlab("") + ylab("") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(-10, 100, 2),
                labels = dollar_format(pre = "", su = " Md€")) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

% du PIB

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation == "D42",
         sheet == "Menages") %>%
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp)) +
  xlab("") + ylab("Dividendes reçus, Ménages (% du PIB)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 0.1),
                labels = percent_format(acc = 0.1)) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

Revenu

% du PIB

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("B6", "B7"),
         sheet == "Menages") %>%
  arrange(date) %>%
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = Operation1)) +
  xlab("") + ylab("% du PIB") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank())

Epargne

% du revenu

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("B8", "B9NF", "B6", "P51"),
         sheet == "Menages") %>%
  select(date, value, operation) %>%
  arrange(date) %>%
  unique %>%
  spread(operation, value) %>%
  transmute(date,
            `Epargne brute des ménages B8/B6` = B8/B6,
            `Besoin (-) ou Capacité (+) de financement B9NF/B6` = B9NF/B6,
            `Formation brute de capital fixe P51/B6` = P51/B6) %>%
  gather(variable, value, -date) %>%
  ggplot + geom_line(aes(x = date, y = value, color = variable)) +
  xlab("") + ylab("% du revenu disponible brut (B6)") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank())

% du PIB

Tous

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("B8", "B9NF", "P51"),
         sheet == "Menages") %>%
  arrange(date) %>%
  left_join(gdp_quarterly, by = "date") %>%
  mutate(Variable = ifelse(operation %in% c("B8", "B9NF"),
                           Operation1, Operation2)) %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = Variable)) +
  xlab("") + ylab("% du PIB") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "5 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank())

2006-

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("B8", "B9NF", "P51"),
         sheet == "Menages") %>%
  arrange(date) %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2006-01-01")) %>%
  mutate(Variable = ifelse(operation %in% c("B8", "B9NF"),
                           Operation1, Operation2)) %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = Variable)) +
  xlab("") + ylab("% du PIB") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "2 years"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank())

2015-

Code
t_recapAgent_val %>%
  left_join(variable, by = c("sheet", "column")) %>%
  filter(operation %in% c("B8", "B9NF", "P51"),
         sheet == "Menages") %>%
  arrange(date) %>%
  left_join(gdp_quarterly, by = "date") %>%
  filter(date >= as.Date("2015-01-01")) %>%
  mutate(Variable = ifelse(operation %in% c("B8", "B9NF"),
                           Operation1, Operation2)) %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = Variable)) +
  xlab("") + ylab("% du PIB") + theme_minimal() +
  scale_x_date(breaks = seq.Date(from = as.Date("1900-01-01"), to = as.Date("2100-10-01"), by = "1 year"),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 2),
                labels = percent_format(acc = 1)) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank())