epiforecasts / covidregionaldata

An interface to subnational and national level COVID-19 data. For all countries supported, this includes a daily time-series of cases. Wherever available we also provide data on deaths, hospitalisations, and tests. National level data is also supported using a range of data sources as well as linelist data and links to intervention data sets.
https://epiforecasts.io/covidregionaldata/
Other
37 stars 18 forks source link

Improve UK data with NHS regions robustness #370

Closed seabbs closed 3 years ago

seabbs commented 3 years ago

At the moment the UK data extraction for NHS regions tries to find a dated csv and if this does not exist it fails. As this csv is often slow to be uploaded we are seeing repeated failures. It might be sensible to build in some more robustness by trying a few dates before failing?

sbfnk commented 3 years ago

I might be completely off the mark but didn't hospitalisations become available via the API at some point? That might be an easier route.

kathsherratt commented 3 years ago

Yep, admissions (and other health data) are available on the API. However this only includes the "all new admissions" measure. I think the original reason we went straight to the NHS data was because it separated out

(Fuller explanation here)

The UK function currently returns both datasets, and we use the first-time admissions measure for the public subnational Rt estimates for England (assuming this is still true @seabbs ). From a quick look at both datasets it seems new first-time admissions are on average 92% of all admissions.

For now I'll put in a quick fix to check over more dates as Sam suggests. However if we are no longer worried about the first vs. re-admissions difference, we can switch to returning only "all" admissions using the API, which would definitely be more stable.

seabbs commented 3 years ago

Seems like a good thing to keep supporting and it is a shame it is not in the API. Thanks for exploring Kath!