5.204 – Consommation finale effective des ménages par produit à prix courants (En milliards d’euros) - t_5204

Data - INSEE

Info

  • Comptes de la Nation 2019 - Consommation. html

  • Comptes de la Nation 2020 - Consommation. html

2019

Désordonné

Code
t_5204 %>%
  left_join(gdp, by = "date") %>%
  filter(date == as.Date("2019-01-01")) %>%
  select(-date) %>%
  mutate(`% du PIB` = (100*value/gdp) %>% round(., digits = 2) %>% paste0(., " %"),
         value = round(value) %>% paste0(" Mds€")) %>%
  select(-gdp) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Ordonné

Code
t_5204 %>%
  left_join(gdp, by = "date") %>%
  filter(date == as.Date("2019-01-01")) %>%
  select(-date) %>%
  arrange(-value) %>%
  mutate(`% du PIB` = (100*value/gdp) %>% round(., digits = 2) %>% paste0(., " %"),
         value = round(value) %>% paste0(" Mds€")) %>%
  select(-gdp) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

GU, BE, OQ

Code
t_5204 %>%
  filter(sector %in% c("A5.GU", "A5.BE", "A5.OQ")) %>%
  left_join(gdp, by = "date") %>%
  ggplot(.) + theme_minimal() + ylab("Consommation (% du PIB)") + xlab("") +
  geom_line(aes(x = date, y = value/gdp, color = Sector, linetype = Sector)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.7, 0.91)) +
  scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_y_log10(breaks = 0.01*seq(0, 100, 2),
                     labels = scales::percent_format(accuracy = 1))

LZ, C5, C1

Linear

Code
t_5204 %>%
  filter(sector %in% c("A10.LZ", "A17.C5", "A17.C1")) %>%
  left_join(gdp, by = "date") %>%
  ggplot(.) + theme_minimal() + ylab("Consommation (% du PIB)") + xlab("") +
  geom_line(aes(x = date, y = value/gdp, color = Sector, linetype = Sector)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.6, 0.8)) +
  scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_y_continuous(breaks = 0.01*seq(0, 100, 2),
                     labels = scales::percent_format(accuracy = 1))

Log

Code
t_5204 %>%
  filter(sector %in% c("A10.LZ", "A17.C5", "A17.C1")) %>%
  left_join(gdp, by = "date") %>%
  ggplot(.) + theme_minimal() + ylab("Consommation (% du PIB)") + xlab("") +
  geom_line(aes(x = date, y = value/gdp, color = Sector, linetype = Sector)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.6, 0.2)) +
  scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_y_log10(breaks = 0.01*seq(0, 100, 2),
                     labels = scales::percent_format(accuracy = 1))

QA, GI, PZ

Code
t_5204 %>%
  filter(sector %in% c("A38.QA", "A10.GI", "A38.PZ")) %>%
  left_join(gdp, by = "date") %>%
  ggplot(.) + theme_minimal() + ylab("Consommation (% du PIB)") + xlab("") +
  geom_line(aes(x = date, y = value/gdp, color = Sector, linetype = Sector)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.6, 0.2)) +
  scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_y_log10(breaks = 0.01*seq(0, 100, 1),
                     labels = scales::percent_format(accuracy = 1))