cmu-delphi / epidatr

Delphi Epidata API R Client
https://cmu-delphi.github.io/epidatr/
Other
1 stars 5 forks source link

lastest_issue is an epiweek, not a date #225

Closed nmdefries closed 9 months ago

nmdefries commented 9 months ago

Because of the switch in https://github.com/cmu-delphi/epidatr/pull/223 to using as.Date(tryFormats = ...) instead of as.Date(format = ...), failed parsing behavior has changed. Now if a value doesn't match any of the provided formats, as.Date errors.

This has caused pub_fluview_meta to start failing. One of the fields is in YYYYWW (epiweek) format, but was being parsed as a date. Presumably with the old code, this was always being replaced with NA when the parsing failed. Ask for it to be formatted as an epiweek instead.