`reve-niv-vie-individu-age-med`%>%left_join(age, by ="Age") %>%filter(!is.na(age)) %>%mutate(year =as.numeric(year)) %>%filter(year %in%c(1996, 2008, 2019)) %>%spread(year, value) %>%transmute(age,`1996-2008`= (`2008`/`1996`)^(1/12)-1,`2008-2019`= (`2019`/`2008`)^(1/11)-1) %>%gather(variable, value, -age) %>% ggplot +geom_line(aes(x = age, y = value, color = variable, group = variable)) +theme_minimal() +theme(legend.position =c(0.15, 0.55),legend.title =element_blank()) +xlab("Age") +ylab("Gain de niveau de vie median en € 'constants' / an, INSEE") +scale_y_continuous(breaks =0.01*seq(-30, 50, 0.1),labels =percent_format(accuracy = .1)) +geom_hline(yintercept =0, linetype ="dashed", color ="black")
75 ans et plus, 30-39 ans, 65-74 ans, Ensemble
IPC
Code
`reve-niv-vie-individu-age-med`%>% year_to_date2 %>%filter(Age %in%c("75 ans et plus", "De 30 à 39 ans", "De 65 à 74 ans", "Ensemble")) %>%group_by(Age) %>%mutate(value =100*value/value[1]) %>%ggplot() +ylab("Indice de niveau de vie médian") +xlab("") +theme_minimal() +geom_line(aes(x = date, y = value, color = Age)) +scale_x_date(breaks =seq(1920, 2025, 2) %>%paste0("-01-01") %>% as.Date,labels =date_format("%Y")) +theme(legend.position =c(0.15, 0.85),legend.title =element_blank()) +scale_y_log10(breaks =seq(10, 300, 2),labels =dollar_format(accuracy =1, prefix =""))
IPCH
Code
IPC_IPCH_adjustment <-`IPCH-IPC-2015-ensemble`%>%group_by(date) %>%summarise(OBS_VALUE =100*OBS_VALUE[INDICATEUR =="IPCH"]/OBS_VALUE[INDICATEUR =="IPC"]) %>%filter(month(date) ==1, date <=as.Date("2019-01-01")) %>%select(date, IPC_IPCH_adjustment = OBS_VALUE)`reve-niv-vie-individu-age-med`%>% year_to_date2 %>%filter(Age %in%c("75 ans et plus", "De 30 à 39 ans", "De 65 à 74 ans", "Ensemble")) %>%group_by(Age) %>%mutate(value =100*value/value[1]) %>%left_join(IPC_IPCH_adjustment, by ="date") %>%ggplot() +ylab("Indice de niveau de vie médian (IPCH)") +xlab("") +theme_minimal() +geom_line(aes(x = date, y =100*value/IPC_IPCH_adjustment, color = Age)) +scale_x_date(breaks =seq(1920, 2025, 2) %>%paste0("-01-01") %>% as.Date,labels =date_format("%Y")) +theme(legend.position =c(0.15, 0.85),legend.title =element_blank()) +scale_y_log10(breaks =seq(10, 300, 2),labels =dollar_format(accuracy =1, prefix =""))