Access the dashbord via this link: Dashboard
This repository contains code to create Leaflet maps showing the proportion of people living with disabilities in the BSOL footprints. The maps are displayed on a Quarto dashboard.
The dataset provides Census 2021 estimates that classify usual residents in England and Wales by long-term health problems or disabilities. The estimates are as at Census Day, 21 March 2021.
Link to dataset: ONS Disability Data
Link to LSOA Lookup: LSOA 21 to Ward 22 to LAD 22 Lookup
- index.qmd: The main markdown file saved in docs folder
Data Preparation
- Enrich the data by joining the main dataset with the LSOA lookup to include information on Ward 22 and LAD 22.
- Filter the data to include only Local Authority Districts (LADs) within the Birmingham and Solihull footprints.
- Calculate the denominator by grouping the data by LSOA code and summing the "Observation" column.
- Optionally, combine the Disability Categories 1 and 2 into a single category.
- Calculate the proportion as: (Observation/Denominator)×100
- Create a total of three datasets, one for each respective disability category map.
Create Heatmap
- Load the datasets and save them as '.rds' files for reusability in Quarto.
- Load the LSOA shapefile.
- Transform the shapefile from OSGB36 (British National Grid or BNG) to CRS 4326 (World Geodetic System 1984 or WGS 84).
- Perform an inner join between each dataset and the LSOA shapefile based on the LSOA code.
- Define the color palette for the heatmap.
- Create a Leaflet map to visualize the data.
-
RStudio: RStudio 2022.07.2+576
-
Quarto: 1.4.514
This repository is dual licensed under the Open Government v3 & MIT. All code can outputs are subject to Crown Copyright.