coronavirus-dashboard-api-python-sdk icon indicating copy to clipboard operation
coronavirus-dashboard-api-python-sdk copied to clipboard

unable to return newPeopleVaccinatedFirstDoseByPublishDate or newPeopleVaccinatedFirstDoseByPublishDate

Open markmac99 opened this issue 4 years ago • 2 comments

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

markmac99 avatar Jan 13 '21 21:01 markmac99

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"}

lirwin3007 avatar Jan 14 '21 11:01 lirwin3007

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

markmac99 avatar Jan 14 '21 15:01 markmac99

closing as the project is abandonware

markmac99 avatar Oct 20 '23 19:10 markmac99