reichlab / zoltr

http://reichlab.io/zoltr/
GNU General Public License v3.0
2 stars 4 forks source link

forecast datetimes are incorrectly parsed as dates #33

Closed matthewcornell closed 3 years ago

matthewcornell commented 3 years ago

Looking at http://reichlab.io/zoltr/articles/getting-started.html#get-a-model-to-work-with-and-list-its-info-and-forecasts , I see that created_at and issued_at are dates, but should be datetimes. The forecast_info(zoltar_connection, forecast_url) function is using as.Date() with a string like "2020-04-13T14:27:27.589708-04:00" (from https://www.zoltardata.com/api/forecast/9753/ ), but it's being parsed as a date, not datetime. We need to use a different library, or pass a formatting string. There may be other fields that are similar (i.e., datetimes that are parsing as dates).