France, Portrait Social 2020 - FPS2020

Data - INSEE

variable

Code
FPS2020 %>%
  group_by(variable, sheet, filename) %>%
  summarise(Nobs = n()) %>%
  print_table_conditional()
variable sheet filename Nobs
DIE (en milliards d’euros 2019) | Figure | F7-5 | 40
Ensemble Figure 3 F7-5 40
Part de la DIE dans le PIB (en % | Figure | F7-5 | 40
Premier degré Figure 3 F7-5 40
Seconddegré Figure 3 F7-5 40
Supérieur Figure 3 F7-5 40

year

Code
FPS2020 %>%
  group_by(year) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(year)) %>%
  print_table_conditional()

Education

Supérieur

1980-

Code
FPS2020 %>%
  filter(sheet == "Figure 3",
         variable == "Supérieur") %>%
  year_to_date2() %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1950, 2022, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 10))

2000-

Code
FPS2020 %>%
  filter(sheet == "Figure 3",
         variable == "Supérieur") %>%
  year_to_date2() %>%
  filter(date >= as.Date("2000-01-01")) %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1997, 2022, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 1))

2002-

Code
FPS2020 %>%
  filter(sheet == "Figure 3",
         variable == "Supérieur") %>%
  year_to_date2() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1997, 2022, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 1))

2007-

Code
FPS2020 %>%
  filter(sheet == "Figure 3",
         variable == "Supérieur") %>%
  year_to_date2() %>%
  filter(date >= as.Date("2007-01-01")) %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1997, 2022, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 1))

Par élève, selon le niveau d’enseignement

Table

Code
FPS2020 %>%
  filter(sheet == "Figure 3") %>%
  year_to_date2() %>%
  select_if(~ n_distinct(.) > 1) %>%
  spread(variable, value) %>%
  arrange(desc(date)) %>%
  print_table_conditional

1980-

Code
FPS2020 %>%
  filter(sheet == "Figure 3") %>%
  year_to_date2() %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1950, 2022, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 10))

2005-

Code
FPS2020 %>%
  filter(sheet == "Figure 3") %>%
  year_to_date2() %>%
  filter(date >= as.Date("2005-01-01")) %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1950, 2022, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 2))

2007-

Code
FPS2020 %>%
  filter(sheet == "Figure 3") %>%
  year_to_date2() %>%
  filter(date >= as.Date("2007-01-01")) %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1950, 2022, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 2))

2008-

Code
FPS2020 %>%
  filter(sheet == "Figure 3") %>%
  year_to_date2() %>%
  filter(date >= as.Date("2008-01-01")) %>%
  group_by(variable) %>%
  mutate(value = 100*value / value[1]) %>%
  ggplot(.) + theme_minimal() + ylab("") + xlab("") +
  geom_line(aes(x = date, y = value, color = variable)) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.8)) +
  scale_x_date(breaks = seq(1950, 2022, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(6)[1:5]) +
  scale_y_log10(breaks = seq(0, 200, 2))

Image

Code
i_g("bib/insee/FPS2020/DIE-par-eleve.png")

Part du PIB

Code
i_g("bib/insee/FPS2020/DIE-PIB.png")

Par élève

Code
i_g("bib/insee/FPS2020/DIE.png")