/nhs-covid19-app-data

NHS COVID-19 Data

Primary LanguagePython

NHS COVID-19 Data

This repo contains tools to regularly update an SQLite database with data fetched from the API of the NHS COVID-19 App, and NHS testing availability.

After the retirement of the COVID-19 App and testing services, the final version of the data collected by this scraper is available here.

An archived version of the final version of this source code is available at https://doi.org/10.5281/zenodo.7883754.

This data powered the app stats page on my Covid Tracker site.

Data Format

The database consists of the following tables:

exposure_keys

This table contains the metadata associated with the temporary exposure keys which have been broadcast as infected. It does not contain the value of the keys themselves, which is of no statistical use and may pose some limited potential risk in identification attacks.

The fields in the table match those in the exposure key export format, with the exception of the export_date field which is the end_timestamp of the key export in which that key was seen.

risky_venues

This contains the data from the risky-venues endpoint which lists venue IDs where exposure could have taken place. This is used by the QR code checkin system.

Data note: Some "risky venue" data is missing between Aug 3-6 2021.

exposure_configuration

This table contains the exposure configuration JSON file fetched from this endpoint, with a new record inserted whenever this changes.

This file is also available in the public git repository, however this is a mirror and may not be updated immediately when the configuration changes.

For changes dated before 2021-07-11, the data in the table has been backfilled using data from the git repository, and so the timestamp will be approximate.

walk_in_pcr_availability

Start date: 2021-12-27

Walk-in PCR test availability across the UK, in the JSON format returned by the website. This table is only updated when the JSON data substantively changes.

home_test_availability

Start date: 2021-12-27

Home test ordering availability, for PCR and LFD tests.