UKHSA-Internal / coronavirus-dashboard-api-python-sdk

Coronavirus (COVID-19) in the UK - API Service SDK for Python
https://coronavirus.data.gov.uk/
MIT License
67 stars 18 forks source link

unable to return newPeopleVaccinatedFirstDoseByPublishDate or newPeopleVaccinatedFirstDoseByPublishDate #33

Closed markmac99 closed 1 year ago

markmac99 commented 3 years ago

If either of these metrics is included in a request, the string name of the metric is returned instead of the numeric data. The equivalent for 2nd vaccine dose works correctly

For example: structure = { "date": "date", "name": "areaName", "code": "areaCode", "Dose1": "cumPeopleVaccinatedFirstDoseByPublishDate", "Dose2": "cumPeopleVaccinatedSecondDoseByPublishDate", } returned data is date,name,code,Dose1,Dose2 2021-01-13,United Kingdom,K02000001,cumPeopleVaccinatedFirstDoseByPublishDate, 2021-01-12,United Kingdom,K02000001,cumPeopleVaccinatedFirstDoseByPublishDate,428232 2021-01-11,United Kingdom,K02000001,cumPeopleVaccinatedFirstDoseByPublishDate,412167

lirwin3007 commented 3 years ago

Just playing about, this seems to be because Dose1 contains a number, and seems to be an issue with the underlying government API

Doesn't work:

{"Dose1":"cumPeopleVaccinatedFirstDoseByPublishDate"}

Works:

{"Dose":"cumPeopleVaccinatedFirstDoseByPublishDate"}
markmac99 commented 3 years ago

Interesting! Still looks like a bug (since "Dose2" works as a name) but thats a useful workaround !

markmac99 commented 1 year ago

closing as the project is abandonware