6  Tools and Resources

NHS-R Community Statement on Tools is a collaborative effort by the community inspired initially from difficulties faced when installing free tools such as R and R Studio.

6.1 NHS Number/CHI number validation

6.1.1 R packages England NHS Number

{nhsnumber} - An R package to work with NHS numbers and their checksums. Available through CRAN. Referred to in an NHSR Community blog The “nhsnumber” package and the joy of sharing your niche.

nhsnumbergenerator - Generates Random NHS Numbers in R. Note, no licence.

6.1.2 Scottish CHI Number

{phsmethods} - available on CRAN. A collection of methods for commonly undertaken analytical tasks, primarily developed for Public Health Scotland (PHS) analysts, but the package is also generally useful to others working in the healthcare space, particularly since it has functions for working with Community Health Index (CHI) numbers. The package can help to make data manipulation and analysis more efficient and reproducible.

6.1.3 Python packages

nhs-number - provides utilities for NHS Numbers, including validity checks, normalisation, and generation.

6.2 Git resources

Git Command Glossary part of the Gov UK RAP Materials.

6.3 APIs/packages

6.3.1 Python packages

Health indicator data sources from NIHR National Institute for Health and Care Research using Python

6.3.2 R packages

{nomisr} can be used to access the API which can be built from the webpage.

{onsr} in Beta for ONS data.

{fingertipsR} for Public Health data also available through the website.

{boundr} to retrieve area boundaries and data from the ONS Open Geography Portal.

{lonlatapi}finds OA (Census output area) data from longitude and latitude data. Depends upon {boundr} being loaded.

{NHSRpostcodetools} package to work with England Postcodes in R