tm106 %>%
filter(NOMENCLATURE %in% c("0452", "0453", "CTOTALE")) %>%
left_join(NOMENCLATURE, by = "NOMENCLATURE") %>%
mutate(DECUC = DECUC %>% as.numeric) %>%
group_by(DECUC) %>%
mutate(CONSO = CONSO/CONSO[NOMENCLATURE == "CTOTALE"]) %>%
filter(NOMENCLATURE != "CTOTALE") %>%
ggplot + geom_line(aes(x = DECUC, y = CONSO, color = Nomenclature)) +
theme_minimal() + xlab("Décile") + ylab("% de la Consommation Totale") +
scale_y_continuous(breaks = 0.01*seq(-30, 50, 0.1),
labels = percent_format(accuracy = .1)) +
scale_x_continuous(breaks = seq(0, 10, 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.4, 0.1),
legend.title = element_blank())