serie_ia <- dares_cvl_clean %>%
group_by(territoire) %>%
arrange(Date) %>%
mutate(
base_ia = Valeur[Date == DATE_IA][1],
indice_ia = (Valeur / base_ia) * 100
) %>%
ungroup()
ggplot(serie_ia, aes(x = Date, y = indice_ia,
color = territoire, group = territoire)) +
# Zone pré-IA
annotate("rect",
xmin = min(serie_ia$Date), xmax = DATE_IA,
ymin = -Inf, ymax = Inf, fill = "#adb5bd", alpha = 0.08) +
annotate("text", x = as.Date("2020-07-01"), y = 107,
label = "Pré-IA", color = "grey50", size = 3.2, fontface = "italic") +
# Zone post-IA
annotate("rect",
xmin = DATE_IA, xmax = max(serie_ia$Date),
ymin = -Inf, ymax = Inf, fill = "#7b2d8b", alpha = 0.05) +
annotate("text", x = as.Date("2024-01-01"), y = 107,
label = "Ère IA", color = "#7b2d8b", size = 3.2, fontface = "italic") +
# Ligne pivot
geom_vline(xintercept = DATE_IA, linetype = "dashed",
color = "#7b2d8b", linewidth = 1) +
annotate("text", x = DATE_IA + 30, y = 103,
label = "Novembre 2022\nChatGPT", color = "#7b2d8b",
size = 2.8, hjust = 0, fontface = "bold") +
geom_hline(yintercept = 100, linetype = "dotted", color = "grey60") +
geom_line(linewidth = 1.2) +
geom_point(data = serie_ia %>% filter(Date == DATE_IA),
size = 3, shape = 21, fill = "white", stroke = 1.5) +
scale_color_manual(values = couleurs, name = NULL) +
scale_x_date(date_breaks = "6 months", date_labels = "%b %Y") +
scale_y_continuous(labels = label_number(suffix = "")) +
labs(
title = "Demandeurs d'emploi categorie A avant et après l'avènement de l'IA",
subtitle = "Base 100 = T4 2022 (lancement de ChatGPT en novembre 2022)",
x = NULL, y = "Indice"
) +
theme_minimal(base_size = 12) +
theme(
legend.position = "top",
panel.grid.minor = element_blank(),
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(face = "bold")
)