Using leaflet to create geographical mappings. NHS geographies as example.
Code as: 02-geoplot-approach.R
.
ICB boundary downloaded from ONS Open Geography Geoportal. Others, such as Regions or Local Authorities, can also be sourced.
Additional ICB information (for hover, colour-coding, labels, filtering) can be defined in ICS_master.xlsx
.
In this case, as an example, we sourced some additional population projection information and practice number information from NHS England allocations.
Trust file trusts_master.xlsx
should contain latitute and longitude. This can be geocoded from postcodes (provided in reference files, namely etr.csv
and ect.csv
), by using a library such as postcodesioR
.
Further trust information (for hover, colour-coding, labels, filtering) can be defined as additional columns in the same file.
*(will render from https://nhsengland.github.io/leaflet-geomaps-NHS/). If seeing readme, click to website or follow links below.
Output of simple cloropleth of ICB boundaries
Output of cloropleth of ICB boundaries colour-coded for population
Output of ICB layer with added Trust markers layer