Priesemann-Group / covid19_inference

Bayesian python toolbox for inference and forecast of the spread of the Coronavirus
GNU General Public License v3.0
73 stars 70 forks source link

Yet Another RKI bugfix #31

Closed semohr closed 4 years ago

semohr commented 4 years ago

They changed to date format again... Using the US local time representation now. Trying the automated pd.to_datetime() for now. Should hopefully circumvent this bug for future changes in the date format.

joaopn commented 4 years ago

I'm not sure letting pandas handle it is a good idea: pd.to_datetime is likely not smart enough to handle possibly random formats without supervision. E.g. they switching MMDD and DDMM can lead to incorrect parsing of 03/Apr/2020 without throwing an error, and wrong data. Since we have an API fallback that sidesteps these issues (and saves locally, so you only have to run it once a day), I'd say we err to the side of caution even if it means taking 5 min to download data once a day when the csv breaks.

semohr commented 4 years ago

I see, agreed. I'm just changed the datestring format in the apply than :+1: