Skip to content
Snippets Groups Projects

Cartograms example

Merged Tom Rushby requested to merge twr1m15/mapping-with-r:cartograms-example into master
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
+ 4
0
@@ -26,6 +26,8 @@ head(sf_data)
```
Draw the map using leaflet ([useful resource](https://rstudio.github.io/leaflet/)) ...
```{r}
# Useful lookup spatial reference for CRS
# https://spatialreference.org/ref/epsg/27700/
@@ -85,6 +87,8 @@ Join to geography data ...
sf_data_elec <- left_join(sf_data,lsoa_elecData, by = c("LSOA11CD" = "Lower Layer Super Output Area (LSOA) Code"))
```
And re-draw the map ...
```{r}
# create popup first (using htmltools)
sf_data_elec$popup_text <-
Loading