Immatriculations mensuelles de voitures particulières neuves en France - immatriculations_voitures_particulieres

Données - SDES

Données brutes et données CVS-CJO

Code
immatriculations_voitures_particulieres |>
  mutate(variable = str_extract(variable, "Donnees (brutes|CVS-CJO)") |> str_remove("Donnees ")) |>
  ggplot() + geom_line(aes(x = date, y = value, color = variable), linewidth = 0.7) +
  theme_minimal() + xlab("") + ylab("Milliers de voitures particulières neuves") +
  theme(legend.title = element_blank()) +
  scale_x_date(date_labels = "%Y", date_breaks = "2 years") +
  scale_color_manual(values = c("brutes" = rgb(0.7, 0.7, 0.7), "CVS-CJO" = rgb(0.2, 0.4, 0.65)))

Glissement annuel, données CVS-CJO

Code
immatriculations_voitures_particulieres |>
  filter(str_detect(variable, "CVS-CJO")) |>
  arrange(date) |>
  mutate(yoy = value/lag(value, 12) - 1) |>
  filter(!is.na(yoy)) |>
  ggplot() + geom_col(aes(x = date, y = yoy, fill = yoy > 0), show.legend = F) +
  theme_minimal() + xlab("") + ylab("Glissement annuel") +
  scale_x_date(date_labels = "%Y", date_breaks = "2 years") +
  scale_y_continuous(labels = scales::percent_format()) +
  scale_fill_manual(values = c("TRUE" = rgb(0.2, 0.5, 0.3), "FALSE" = rgb(0.7, 0.25, 0.25)))