From efc908f7f78815c6e1d0b21acf794c7be43e7bb8 Mon Sep 17 00:00:00 2001 From: Tom White Date: Wed, 1 Jul 2020 21:28:09 +0100 Subject: [PATCH] Stop publishing England UTLA confirmed case numbers since they don't include Pillar 2 tests (#67) --- README.md | 1 + tools/crawl_all.py | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e4868fec..aaef4fbb 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ There is an *experimental* [Datasette instance](https://covid-19-uk-datasette-65 ## News +* 1 July 2020. England UTLA confirmed case data is no longer being included since it doesn't have Pillar 2 tests, which make up the vast majority of tests. * 1 July 2020. NI data is no longer being included since the (undocumented) backend API changed again, and the NI Department of Health does not provide a machine-readable alternative. (See 2 June 2020 entry below.) * 30 June 2020. With the new Leicester lockdown, media attention around the lack of Pillar 2 data in England has increased. I have added a prominent warning to the top of this README. * 2 June 2020. I received a reply from the NI Department of Health to my enquiry about making machine readable downloads available. For this reason I may stop collating NI data in this repository, since the JSON API the code uses is undocumented and changes from time-to-time. See https://github.com/tomwhite/covid-19-uk-data/issues/63. diff --git a/tools/crawl_all.py b/tools/crawl_all.py index 12e86949..d4f264e1 100755 --- a/tools/crawl_all.py +++ b/tools/crawl_all.py @@ -142,12 +142,13 @@ def total_confirmed_cases_utla_df(utla_code, utla): df = df[["Date", "Country", "AreaCode", "Area", "TotalCases"]] return df - all_cases_dfs = [] - for utla_code in json_data["utlas"].keys(): - cases = total_confirmed_cases_utla_df(utla_code, json_data["utlas"][utla_code]["name"]["value"]) - all_cases_dfs.append(cases) - area_cases = pd.concat(all_cases_dfs, ignore_index=True) - save_cases_df_to_sqlite(area_cases, "England") + # Don't publish England UTLA confirmed case numbers since they don't include Pillar 2 data + # all_cases_dfs = [] + # for utla_code in json_data["utlas"].keys(): + # cases = total_confirmed_cases_utla_df(utla_code, json_data["utlas"][utla_code]["name"]["value"]) + # all_cases_dfs.append(cases) + # area_cases = pd.concat(all_cases_dfs, ignore_index=True) + # save_cases_df_to_sqlite(area_cases, "England") # Scotland historical test numbers