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

Fix covid19datahub bug #352

Closed joseph-palmer closed 3 years ago

joseph-palmer commented 3 years ago

Error caused by select(where( ~ !all(is.na(.x))). This was used to remove level columns not requested (e.g. if level 2 was requested this was designed to not select level 3 columns) by rejecting columns that are all NAs. The problem is that with the snapshot other columns that are used were composed of all NAs. This meant the code worked in full but not with the snapshot.

This PR replaces the removal of NA columns in cleaning with a removal of level columns not requested.

closes #347

github-actions[bot] commented 3 years ago

👋 Thanks for opening this pull request! Can you please run through the following checklist before requesting review (ticking as complete or if not relevant).

Thank you again for the contribution. If making large scale changes consider using our pre-commit hooks (see the contributing guide) to more easily comply with our guidelines.