X-Git-Url: https://git.njae.me.uk/?p=covid19.git;a=blobdiff_plain;f=data_import.py;h=833a6eb443a5c1bd41d6c009c339848350bf0f75;hp=8ec03d13d550e6ce90f8bcaf69a54a939d5c36e3;hb=HEAD;hpb=15eaad40c32fd6ac6ce6457451f4933fb45890b0 diff --git a/data_import.py b/data_import.py index 8ec03d1..833a6eb 100644 --- a/data_import.py +++ b/data_import.py @@ -171,6 +171,7 @@ uk_query_string = ( "metric=newCasesBySpecimenDate&" "metric=hospitalCases&" "metric=newDeaths28DaysByPublishDate&" +"metric=cumDeaths28DaysByPublishDate&" "format=csv" ) @@ -210,6 +211,7 @@ uk_data.rename( 'newCasesBySpecimenDate': 'new_cases', 'hospitalCases': 'hospital_cases', 'newDeaths28DaysByPublishDate': 'new_deaths', + 'cumDeaths28DaysByPublishDate': 'cum_deaths', 'newAdmissions': 'new_admissions', 'newPCRTestsByPublishDate': 'new_pcr_tests', 'newTestsByPublishDate': 'new_tests', @@ -221,6 +223,7 @@ uk_data.rename( uk_data[['date', 'hospital_cases', 'ventilator_beds', 'new_cases', 'new_deaths', + 'cum_deaths', 'hospital_cases', 'new_admissions', 'new_pcr_tests', 'new_tests', 'new_pillar_1_2_tests' ]].to_sql( @@ -236,6 +239,7 @@ uk_data[['date', "new_cases": Integer, "hospital_cases": Integer, "new_deaths": Integer, + "cum_deaths": Integer, "new_admissions": Integer, 'new_pcr_tests': Integer, 'new_tests': Integer, @@ -305,3 +309,5 @@ insert into uk_data_7(date, with engine.connect() as connection: connection.execute(query_string) + +# %%