GetCovidData Class#
- class GetCovidData.GetCOVIDData(nation)#
Bases:
object
This class will download 3 CSV files from the UK Governments COVID API. These files will be saved in /data/autoimport and loaded in memory by the LoadDatasets class
- pull_data(nation)#
This method is called when the GetCovidData object is created.
Example:
from GetCovidData import GetCOVIDData as datapull pulldata = dataPull("England")
It downloads covid data using the UK Governments COVID-19 API Version 1. You can add more fields to this class in order to get different datasets. The current datasets that are downloaded can be view below.
dateareaNameareaCodehospitalCasesnewAdmissionsnewCasesBySpecimenDatenewDeaths28DaysByDeathDatenewPillarTwoTestsByPublishDatenewDeaths28DaysByPublishDatenewPillarOneTestsByPublishDatenewCasesLFDConfirmedPCRBySpecimenDatenewCasesPCROnlyBySpecimenDatenewPCRTestsByPublishDatenewLFDTestsnewCasesLFDOnlyBySpecimenDatecumPeopleVaccinatedSecondDoseByPublishDatenewCasesByPublishDatenewCasesBySpecimenDateAgeDemographicsnewDeaths28DaysByDeathDateAgeDemographicsvaccinationsAgeDemographicsTo view datasets that can be added go to https://coronavirus.data.gov.uk/details/download
Note
Age profiled data for Scotland, Wales and NI is not available. If you select one of these nations the age profiled data will not be downloaded. You will only download non-age specific data saved in data.csv
- Args:
- nation
String Value, can be “England”, “Scotland” or “Wales”