Cartograms example
Compare changes
- Tom Rushby authored
+ 32
− 12
@@ -3,10 +3,13 @@ title: "Non-contiguous hexograms"
@@ -19,10 +22,12 @@ library(ggplot2)
One of the problems associated with mapping area-based data is the often highly variable size of geographical areas. With data such as that provided by Census (OA, LSOA, MSOA etc) representing similar populations, the dominance of the largest areas can lead to mis-interpretation (and potential overlooking of smaller areas). Cartograms have been used to resize areas in accordance with other attributes such as population. For more background and creating hexograms in R see [Hexograms: better maps of area based data](https://rstudio-pubs-static.s3.amazonaws.com/342278_51068843182b41ad9e00dfcc35e65247.html).
This example follows an example of creating a non-contiguous hexogram (and re-uses code) by [@VictimOfMaths](https://github.com/VictimOfMaths/Maps/blob/master/WFHCartogram.R) using hex-map geometry from [House of Commons Library](https://github.com/houseofcommonslibrary/uk-hex-cartograms-noncontiguous/).
@@ -37,13 +42,13 @@ ltla <- curl_download(url=source, destfile=ltla, quiet=FALSE, mode="wb")
@@ -54,9 +59,9 @@ Group_labels <- st_read(ltla, layer="1 Group labels") %>%
@@ -72,7 +77,7 @@ ggplot()+
@@ -84,13 +89,13 @@ msoa <- curl_download(url = source, destfile = msoa, quiet = FALSE, mode = "wb")
@@ -101,9 +106,9 @@ msoa_group_labels <- st_read(msoa, layer="1 Group labels") %>%
@@ -123,4 +128,19 @@ ggplot()+