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 validation

6.1.1 R packages

{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 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