load_data("eurostat/geo_fr.RData")
data1 %>%
inner_join(data2, by = "geo") %>%
left_join(geo, by = "geo") %>%
mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
filter(!(geo %in% c("EA18", "EA", "EU", "EU27_2020", "EU28"))) %>%
ggplot(.) + theme_minimal() + xlab("Taux de locataires") + ylab("Poids des loyers dans l'indice des prix") +
geom_point(aes(x = `Share of renters (%)`/100, y = `Rent in HICP (%)`/100)) +
scale_x_continuous(breaks = 0.01*seq(-100, 100, 10),
labels = percent_format(accuracy = 1),
limits = c(0, 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 100, 2),
labels = percent_format(accuracy = 1),
limits = c(0, 0.22)) +
stat_smooth(aes(x = `Share of renters (%)`/100, y = `Rent in HICP (%)`/100),
linetype = 2, method = "lm", color = "#F2A900") +
geom_text_repel(aes(x = `Share of renters (%)`/100, y = `Rent in HICP (%)`/100, label = Geo))