Mapping with R
Simple (and not so simple) examples of mapping data with R
You might also like https://git.soton.ac.uk/twr1m15/la_emissions_viz which drives https://rushby.shinyapps.io/LAemissions/
data
The following example data is provided in the data folder of this repository:
- Boundary data - for Solent region (various geographies: LA, LSOA, MSOA) - Open Government Licence v3.0
- Energy - area-based statistics for domestic electricity consumption (England & Wales: LSOA, MSOA) - Open Government Licence v3.0
- Lookup table for English geographies - Open Government Licence v3.0
You link these using the relevant area level codes such as:
- Local Authority:
LA Code
<->lad18cd
- LSOA:
Lower Layer Super Output Area (LSOA) Code
<->LSOA11CD
- etc
Examples
rMappingExample
A simple example of mapping using R. Examples using Local Authority (LA) and Middle-layer Super Output Area (MSOA) geography and electricity consumption data (provided in data
subfolder).
ONS-open-geography
An example and resources for using the ONS Open Geography portal to download geographical data and create maps using Leaflet
package.
See the open-geog-API folder for API examples
LSOA example
What it says on the tin
Fun with cartograms
What it says on the tin
Resources
Openstreetmap for base maps (i.e. map tiles/rasters)
- Edinburgh green space as an example with sf
- Madrid supermarkets with sf
- Short term rentals in Halifax, Nova Scotia with sf
Google maps for base maps
They want you to have an API key now. Yeah nah.
tmap package - nice
- check out the bubble geom