diff --git a/ppt/.~lock.Ruralitic-Hig-20260526-eng.pptx# b/ppt/.~lock.Ruralitic-Hig-20260526-eng.pptx# index c3ab6ae..bd758b1 100644 --- a/ppt/.~lock.Ruralitic-Hig-20260526-eng.pptx# +++ b/ppt/.~lock.Ruralitic-Hig-20260526-eng.pptx# @@ -1 +1 @@ -,pab,onigashima,26.05.2026 10:40,file:///home/pab/.config/libreoffice/4; \ No newline at end of file +,pab,onigashima,26.05.2026 11:03,file:///home/pab/.config/libreoffice/4; \ No newline at end of file diff --git a/ppt/Ruralitic-Hig-20260526-eng.pptx b/ppt/Ruralitic-Hig-20260526-eng.pptx index 8aa433a..56cff22 100644 Binary files a/ppt/Ruralitic-Hig-20260526-eng.pptx and b/ppt/Ruralitic-Hig-20260526-eng.pptx differ diff --git a/ppt/content.R b/ppt/content.R index 4fe913e..1bdf165 100644 --- a/ppt/content.R +++ b/ppt/content.R @@ -72,7 +72,7 @@ row_df <- as.data.frame(afc$row$coord[, 1:2]) |> label_munis <- c("Stockholm", "Göteborg", "Malmö", "Uppsala", "Lund", "Umeå", "Linköping", "Solna", "Danderyd", "Kiruna", "Gotland", "Knivsta", "Falköping", "Tomelilla", "Skellefteå", "Piteå", - "Partille", "Sundbyberg", "Lindesberg") + "Partille", "Sundbyberg", "Lindesberg", "Gävle") contribs <- as.data.frame(afc$col$contrib) |> rownames_to_column("variable") |> @@ -84,15 +84,22 @@ col_df <- as.data.frame(afc$col$coord[, 1:2]) |> rownames_to_column("variable") |> filter(variable %in% contribs$variable) +highlight_munis <- c("Gävle") + fig_biplot <- ggplot() + geom_hline(yintercept = 0, linetype = "dashed", colour = "grey60") + geom_vline(xintercept = 0, linetype = "dashed", colour = "grey60") + geom_point(data = row_df, aes(`Dim 1`, `Dim 2`, colour = cluster_label), alpha = 0.75, size = 2.2) + + geom_point(data = row_df |> filter(municipality %in% highlight_munis), + aes(`Dim 1`, `Dim 2`), + shape = 21, size = 5, stroke = 1.5, + fill = NA, colour = "black") + geom_text_repel( data = row_df |> filter(municipality %in% label_munis), - aes(`Dim 1`, `Dim 2`, label = municipality), + aes(`Dim 1`, `Dim 2`, label = municipality, + fontface = if_else(municipality %in% highlight_munis, "bold", "plain")), size = 5, colour = "grey20", family = "source_sans_3", max.overlaps = 30, segment.size = 0.25 ) + @@ -245,3 +252,29 @@ fig_county <- ggplot(combined, aes(x = share, y = county, fill = cluster_label)) ggsave("ppt/figures/slide4_county.png", fig_county, width = 14, height = 9, dpi = 150) message("Saved: ppt/figures/slide4_county.png") + +# Standalone: absolute population stacked bars (bar length = total population) +fig_county_abs <- ggplot(county_pop, + aes(x = pop, y = county, fill = cluster_label)) + + geom_col(width = 0.8) + + geom_text( + aes(label = pop_label), + position = position_stack(vjust = 0.5), + size = 3.3, family = "source_sans_3", colour = "grey20", + check_overlap = TRUE + ) + + scale_fill_manual(values = cluster_palette |> set_names(cluster_labels), + name = NULL) + + scale_x_continuous(labels = \(x) paste0(round(x / 1e6, 1), "M"), + expand = c(0, 0)) + + labs(y = NULL, x = "Total population") + + theme( + axis.text.y = element_text(size = 14), + legend.position = "bottom", + legend.text = element_text(size = 13) + ) + + guides(fill = guide_legend(nrow = 3)) + +ggsave("ppt/figures/slide4_county_abs.png", fig_county_abs, + width = 9, height = 9, dpi = 150) +message("Saved: ppt/figures/slide4_county_abs.png") diff --git a/ppt/figures/slide2_biplot.png b/ppt/figures/slide2_biplot.png index f2ac40e..843a94d 100644 Binary files a/ppt/figures/slide2_biplot.png and b/ppt/figures/slide2_biplot.png differ diff --git a/ppt/figures/slide3_clusters.png b/ppt/figures/slide3_clusters.png index cedc47a..78ce174 100644 Binary files a/ppt/figures/slide3_clusters.png and b/ppt/figures/slide3_clusters.png differ diff --git a/ppt/figures/slide4_county_abs.png b/ppt/figures/slide4_county_abs.png new file mode 100644 index 0000000..5b27c9e Binary files /dev/null and b/ppt/figures/slide4_county_abs.png differ