Revalorisation du Régime général de la caisse nationale d’assurance vieillesse (CNAV)

Data - IPP

Info

source dataset .html .RData
insee INDICE-TRAITEMENT-FP 2024-11-05 2024-11-08
insee IPC-2015 2024-11-05 2024-11-05
insee IPCH-2015 2024-11-05 2024-11-05
ipp revalorisation_pension 2024-11-09 2024-11-09

Données sur le pouvoir d’achat

source dataset .html .RData
insee CNA-2014-RDB 2024-11-05 2024-11-08
insee CNT-2014-CSI 2024-11-05 2024-11-08
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-11-05 2024-09-02
insee t_salaire_val 2024-11-05 2024-09-02
oecd HH_DASH 2024-09-15 2023-09-09

Données sur les retraites

source dataset .html .RData
insee DECES-MORTALITE 2024-11-05 2024-11-08
ipp revalorisation_pension 2024-11-09 2024-11-09

Base 100

All

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot() + geom_line(aes(x = date, y = value)) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 3000, 100)) +
  ylab("Point Indice Fonction Publique") + xlab("")

1996-

nominal

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("1996-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot() + geom_line(aes(x = date, y = value)) +
  theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 3000, 5)) +
  ylab("Pensions") + xlab("")

reel

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("1996-01-01")) %>%
  transmute(date,
            `Retraites vs. 1999 (IPCH, Eurostat)` = (value/value[1])*(cpih[1]/cpih)-1,
            `Retraites vs. 1999 (IPC, INSEE)` = (value/value[1])*(cpi[1]/cpi)-1) %>%
  gather(variable, OBS_VALUE, -date) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, color = variable)) + theme_minimal() +
  scale_x_date(breaks = seq(1996, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 1),
                     labels = percent_format(acc = 1)) + 
  ylab("Retraites vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1996, 2040, 2),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE, acc = 1)), 
                  fontface ="bold", color = "black", size = 3)

1999-

nominal

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("1999-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot() + geom_line(aes(x = date, y = value)) +
  theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 3000, 5)) +
  ylab("Pensions") + xlab("")

reel

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("1999-01-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("1999-01-01")) %>%
  transmute(date,
            `Retraites vs. 1999 (IPCH, Eurostat)` = (value/value[1])*(cpih[1]/cpih)-1,
            `Retraites vs. 1999 (IPC, INSEE)` = (value/value[1])*(cpi[1]/cpi)-1) %>%
  gather(variable, OBS_VALUE, -date) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, color = variable)) + theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 2),
                     labels = percent_format(acc = 1)) + 
  ylab("Retraites vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE, acc = 1)), 
                  fontface ="bold", color = "black", size = 3)

Décembre 2007-

nominal

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2007-12-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot() + geom_line(aes(x = date, y = value)) +
  theme_minimal() +
  scale_x_date(breaks = seq(2008, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 3000, 5)) +
  ylab("Pensions") + xlab("") + 
  geom_label(data = . %>% tail(1), aes(x = date, y = value, label = round(value, 1)))

2008-

nominal

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2008-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot() + geom_line(aes(x = date, y = value)) +
  theme_minimal() +
  scale_x_date(breaks = seq(2008, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 3000, 5)) +
  ylab("Pensions") + xlab("") + 
  geom_label(data = . %>% tail(1), aes(x = date, y = value, label = round(value, 1)))

Réel

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2007-12-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("2007-12-01")) %>%
  transmute(date,
            `Retraites vs. 2008 (IPCH, Eurostat)` = (value/value[1])*(cpih[1]/cpih)-1,
            `Retraites vs. 2008 (IPC, INSEE)` = (value/value[1])*(cpi[1]/cpi)-1) %>%
  gather(variable, OBS_VALUE, -date) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, color = variable)) + theme_minimal() +
  scale_x_date(breaks = seq(2008, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 1),
                     labels = percent_format(acc = 1)) + 
  ylab("Retraites vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(date %in% c(as.Date("2014-01-01"),
                                            as.Date("2017-04-01"),
                                            max(date))),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

2017-

nominal

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2017-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot() + geom_line(aes(x = date, y = value)) +
  theme_minimal() +
  scale_x_date(breaks = seq(2017, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 3000, 5)) +
  ylab("Pensions") + xlab("") + 
  geom_label(data = . %>% tail(1), aes(x = date, y = value, label = round(value, 1)))

Réel

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2017-01-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("2007-01-01")) %>%
  transmute(date,
            `Retraites vs. 2017 (IPCH, Eurostat)` = (value/value[1])*(cpih[1]/cpih)-1,
            `Retraites vs. 2017 (IPC, INSEE)` = (value/value[1])*(cpi[1]/cpi)-1) %>%
  gather(variable, OBS_VALUE, -date) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, color = variable)) + theme_minimal() +
  scale_x_date(breaks = seq(2008, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 1),
                     labels = percent_format(acc = 1)) + 
  ylab("Retraites vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(date %in% c(as.Date("2014-01-01"),
                                            as.Date("2017-04-01"),
                                            max(date))),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

2021-

nominal

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2021-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot() + geom_line(aes(x = date, y = value)) +
  theme_minimal() +
  scale_x_date(breaks = seq(2017, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 3000, 2)) +
  ylab("Pensions") + xlab("") + 
  geom_label(data = . %>% tail(1), aes(x = date, y = value, label = round(value, 1)))

Réel

Code
revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2021-01-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("2021-01-01")) %>%
  transmute(date,
            `Retraites vs. 2017 (IPCH, Eurostat)` = (value/value[1])*(cpih[1]/cpih)-1,
            `Retraites vs. 2017 (IPC, INSEE)` = (value/value[1])*(cpi[1]/cpi)-1) %>%
  gather(variable, OBS_VALUE, -date) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, color = variable)) + theme_minimal() +
  scale_x_date(breaks = seq(2008, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 1),
                     labels = percent_format(acc = 1)) + 
  ylab("Retraites vs. 2021") + xlab("") +
  geom_text(data = . %>% filter(date %in% c(as.Date("2014-01-01"),
                                            as.Date("2017-04-01"),
                                            max(date))),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

1999-

Retraites

Code
data1 <- revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("1999-01-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("1999-01-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih),
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Retraites vs. 1999")

data1 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Retraites vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Indice Fonction Publique

Code
load_data("insee/INDICE-TRAITEMENT-FP-net-brut-mensuel.RData")
data2 <- indicefp %>%
  select(date, point_indice_en_euros) %>%
  arrange(desc(date)) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  left_join(net_brut_mensuel, by = "date") %>%
  filter(date >= as.Date("1999-01-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih)*net_brut,
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)*net_brut) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Point d'Indice de la Fonction Publique vs. 1999")

data2 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Point Indice Fonction Publique vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Merge

Code
data2 %>%
  bind_rows(data1) %>%
  mutate(variable = factor(variable, levels = c("Retraites vs. 1999",
                                                "Point d'Indice de la Fonction Publique vs. 1999"))) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE,  color = variable, linetype = type)) + theme_minimal() +
  scale_linetype_manual(values = c("dashed", "solid")) +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.32, 0.25),
        legend.title = element_blank(),
        legend.key.size = unit(0.5, "cm")) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Valeur vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(date == max(date)),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 1), color = variable), 
                  fontface ="bold", size = 3)

2007-12-

Retraites

Code
data1 <- revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2007-12-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("2007-12-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih),
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Retraites vs. 2008")

data1 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Retraites vs. 2008") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Indice Fonction Publique

Code
load_data("insee/INDICE-TRAITEMENT-FP-net-brut-mensuel.RData")
data2 <- indicefp %>%
  select(date, point_indice_en_euros) %>%
  arrange(desc(date)) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  left_join(net_brut_mensuel, by = "date") %>%
  filter(date >= as.Date("2007-12-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih)*net_brut,
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)*net_brut) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Point d'Indice de la Fonction Publique vs. 2008")

data2 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Point Indice Fonction Publique vs. 2008") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Merge

Code
data2 %>%
  bind_rows(data1) %>%
  mutate(variable = factor(variable, levels = c("Retraites vs. 2008",
                                                "Point d'Indice de la Fonction Publique vs. 2008"))) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE,  color = variable, linetype = type)) + theme_minimal() +
  scale_linetype_manual(values = c("dashed", "solid")) +
  scale_x_date(breaks = c(seq(1998, 2100, 2), seq(2008, 2100, 2)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.32, 0.25),
        legend.title = element_blank(),
        legend.key.size = unit(0.5, "cm")) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Valeur vs. 2008") + xlab("") +
  geom_text(data = . %>% filter(date == max(date)),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

2012-

Retraites

Code
data1 <- revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2012-01-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("2012-01-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih),
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Retraites vs. 2012")

data1 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Retraites vs. 2012") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Indice Fonction Publique

Code
load_data("insee/INDICE-TRAITEMENT-FP-net-brut-mensuel.RData")
data2 <- indicefp %>%
  select(date, point_indice_en_euros) %>%
  arrange(desc(date)) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  left_join(net_brut_mensuel, by = "date") %>%
  filter(date >= as.Date("2012-01-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih)*net_brut,
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)*net_brut) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Point d'Indice de la Fonction Publique vs. 2012")

data2 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Point Indice Fonction Publique vs. 2012") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Merge

Code
data2 %>%
  bind_rows(data1) %>%
  mutate(variable = factor(variable, levels = c("Retraites vs. 2012",
                                                "Point d'Indice de la Fonction Publique vs. 2012"))) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE,  color = variable, linetype = type)) + theme_minimal() +
  scale_linetype_manual(values = c("dashed", "solid")) +
  scale_x_date(breaks = c(seq(1999, 2100, 1), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.32, 0.25),
        legend.title = element_blank(),
        legend.key.size = unit(0.5, "cm")) +
  scale_y_log10(breaks = seq(2, 0.02, -0.02),
                labels = percent(seq(2, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Valeur vs. 2017") + xlab("") +
  geom_text(data = . %>% filter(date == max(date)),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1), color = variable), 
                  fontface ="bold",  size = 3)

2017-

Retraites

Code
data1 <- revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2017-01-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("2017-01-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih),
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Retraites vs. 2017")

data1 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Retraites vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Indice Fonction Publique

Code
load_data("insee/INDICE-TRAITEMENT-FP-net-brut-mensuel.RData")
data2 <- indicefp %>%
  select(date, point_indice_en_euros) %>%
  arrange(desc(date)) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  left_join(net_brut_mensuel, by = "date") %>%
  filter(date >= as.Date("2017-01-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih)*net_brut,
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)*net_brut) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Point d'Indice de la Fonction Publique vs. 2017")

data2 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Point Indice Fonction Publique vs. 1999") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Merge

Code
data2 %>%
  bind_rows(data1) %>%
  mutate(variable = factor(variable, levels = c("Retraites vs. 2017",
                                                "Point d'Indice de la Fonction Publique vs. 2017"))) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE,  color = variable, linetype = type)) + theme_minimal() +
  scale_linetype_manual(values = c("dashed", "solid")) +
  scale_x_date(breaks = c(seq(1999, 2100, 1), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.32, 0.25),
        legend.title = element_blank(),
        legend.key.size = unit(0.5, "cm")) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Valeur vs. 2017") + xlab("") +
  geom_label(data = . %>% filter(date == max(date)),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1), color = variable), 
                  fontface ="bold",  size = 3)

Juin 2017

Retraites

Code
data1 <- revalorisation_pension %>%
  select(date, index) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  filter(date >= as.Date("2017-06-01")) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  filter(date >= as.Date("2017-06-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih),
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Retraites vs. juin 2017")

data1 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = seq(1999, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Retraites vs. juin 2017") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Indice Fonction Publique

Code
load_data("insee/INDICE-TRAITEMENT-FP-net-brut-mensuel.RData")
data2 <- indicefp %>%
  select(date, point_indice_en_euros) %>%
  arrange(desc(date)) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  complete(date = seq.Date(min(date), max(date), by = "day")) %>%
  fill(value) %>%
  ungroup %>%
  left_join(cpi2_m, by = "date") %>%
  filter(day(date) == 1) %>%
  left_join(net_brut_mensuel, by = "date") %>%
  filter(date >= as.Date("2017-06-01")) %>%
  transmute(date,
            `IPCH, Eurostat` = (value/value[1])*(cpih[1]/cpih)*(net_brut/net_brut[1]),
            `IPC, INSEE` = (value/value[1])*(cpi[1]/cpi)*(net_brut/net_brut[1])) %>%
  gather(type, OBS_VALUE, -date) %>%
  mutate(variable = "Point d'Indice de la Fonction Publique vs. juin 2017")

data2 %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE, linetype = type)) + theme_minimal() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.43, 0.12),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Point Indice Fonction Publique vs. juin 2017") + xlab("") +
  geom_text(data = . %>% filter(year(date) %in% seq(1999, 2040, 5),
                                month(date) == 1),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1)), 
                  fontface ="bold", color = "black", size = 3)

Merge

Code
data2 %>%
  bind_rows(data1) %>%
  mutate(variable = factor(variable, levels = c("Retraites vs. juin 2017",
                                                "Point d'Indice de la Fonction Publique vs. juin 2017"))) %>%
  ggplot() + geom_line(aes(x = date, y = OBS_VALUE,  color = variable, linetype = type)) + theme_minimal() +
  scale_linetype_manual(values = c("dashed", "solid")) +
  scale_x_date(breaks = c(seq(1999, 2100, 1), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.32, 0.25),
        legend.title = element_blank(),
        legend.key.size = unit(0.5, "cm")) +
  scale_y_log10(breaks = seq(1, 0.02, -0.02),
                labels = percent(seq(1, 0.02, -0.02)-1, acc = 1)) + 
  ylab("Valeur vs. 2017") + xlab("") +
  geom_label(data = . %>% filter(date == max(date)),
            aes(x = date, y = OBS_VALUE, label = percent(OBS_VALUE-1, acc = 0.1), color = variable), 
                  fontface ="bold",  size = 3)