This repository contains the scripts for the creation of an interactive geospatial mapping tool developed to provide BI support to the NHS England Artificial Intelligence Diagnostic Fund (AIDF). More information on the AIDF is available here.
Data related to each of the NHS Trust providers and Imaging Networks was collected from the Short Form Business Cases available on the NHS Futures site.
This tool aims to visualise three aspects of the AIDF programme:
- Key information related to the Imaging Networks and their respective NHS Trusts who are currently enrolled within the AIDF programme.
- The imaging procedure modality of each Imaging Network's planned AIDF utilisation.
- Geospatial visualisation of each Imaging Network's commissioning boundary and respective NHS Trust HQ locations.
The geospatial visualisations within this mapping tool have been created using the leaflet()
functions and libraries within the R programming language.
This repository can be cloned to visualise the location and key information related to each Imaging Network and respective NHS Trusts currently enrolled in the AIDF programme.
Users will need to ensure their working directory is structured as outlined in the Repo Structure section of this ReadMe. This can be completed using Git or by simply downloading a zipped version of the tool from this repository.
As well as the scripts included within this Git repository, there are three data files users will need to run the mapping tool, as well as an MSOA shapefile. These are outlined within the data
section of this ReadMe.
Following the cloning of this repository to the user's preferred IDE, and assuming all the constituent data files are located in the appropriate folder, the mapping tool can be ran by knitting the AIDF_Mapping_Tool.Rmd
document found within the src > geospatial
folder. The tool can then be visualised within the IDE or exported to an appropriate browser application.
In summary:
- Extract this repository to your local files.
- Ensure all necessary data files are in their respective locations as outlined in
data
section. - Knit the
AIDF_Mapping_Tool.Rmd
file located within thesrc > r_scripts > geospatial
folder.
More information on how to run the visualisation tool is available in the documentation/running_the_tool.md
file.
At present the structure of the repository is:
├─── data
└─── archived
└─── geospatial
└─── raw SFBC
└─── TU summaries
└─── Geospatial
└─── MSOA Shapefile
└─── processed SFBC
├─── documentation
├─── images
└─── src
└─── config
└─── r_scripts
└─── geospatial
└─── r_scripts
└─── Implementation
└─── Modality
└─── Network
└─── processing (archived)
└─── r_scripts
For the purposes of running the model in the current build, the raw SFBC
and processing (archived)
folder can be ignored. These folders relate to earlier development work centred around processing the raw SFBC inputs into a single processed data file.
Where the extracted NHS Futures short form business case (SFBC) data will be saved for loading and processing. To run a simplified version of this tool, the user will only need to ensure that the processed SFBC and geospatial data files are in their respective folders. Data related to the raw SFBC and TU summary are archived in this latest iteration of the tool.
The data files needed for the running of the tool are:
trust_msoa_lookup.xlsx
- a lookup table for linking NHS Trusts to Middle Layer Super Output Areas (MSOA) based on aggregated patient attendance from each MSOA. This data is accessible via the Office for Health Improvement and Disparities NHS Acute Hospital Trust Catchment Populations work available here. The file is located insrc > data > geospatial
.MSOA shapefile
- a ShapeFile of each MSOA in the UK, available from the Office for National Statistics Open Geography Portal here.AIDF_Geo_Final.csv
- processed SFBC data are extracted and cleaned by the TU team from the raw SFBC files available on the NHS Futures site. The file is located insrc > data > processed SBFC
. Available upon request.
Images such as TU logos and branding to add to outputs.
All code is stored in src
. This is subdivided into three modules:
config
: Files for configuring the output such as thetheme.css
for the html output and the.packages.R
file containing the dependent packages.geospatial
: Files for the creation of the geospatial html tool.processing (archived)
: Files for extracting data from SBFC files for the creation of the geospatial tool. These scripts remain from an older iteration of the model and are currently archived.
This repository has been created and developed by: