ccodwg / CovidTimelineCanada

A definitive dataset for COVID-19 in Canada
https://opencovid.ca/
Other
26 stars 8 forks source link

sychronize data by date #48

Closed mister-elliott closed 2 years ago

mister-elliott commented 2 years ago

One of my use cases was to compute deaths/cases rate on a daily basis, with the assumption that both data would appear for the same date. This was the case in the old dataset, but seems to be missing in this new version, for example cases_ and deaths_hr.csv: cases for this health region are only updated to 05-09 but deaths are updated to 17.
"cases","AB","4834","2022-05-09",184429,276 "deaths","AB","4834","2022-05-17",1699,0

I stuff your data back into a mySQL database, and have all the code to input and process the old dataset, and had hoped this dataset would behave the same. As it is, this data harder to use, since I have to either backfill data myself or search for dates which have both data synced to do my computes. Was easy, now is harder.

jeanpaulrsoucy commented 2 years ago

This bug (affecting a few death time series---AB, BC, NL) will be fixed shortly (see #40 and ccodwg/Covid19CanadaETL#39). See also #49 for the special cases of AB and BC.

In the meantime, you can use the fill=true parameter on the API to fill all the time series up to the current date. E.g., for HR case data: https://api.opencovid.ca/timeseries?stat=cases&geo=hr&fill=true&fmt=csv

jeanpaulrsoucy commented 2 years ago

Hi @mister-elliott, this issue should now be fixed for AB, BC, NL cases & deaths.

Closed by #49 and ccodwg/Covid19CanadaETL#39.