cmu-delphi / epidatr

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

Raise error when dates / date range are passed to things expecting weeks? #278

Open brookslogan opened 6 months ago

brookslogan commented 6 months ago

To give a better error/warning/result than this:

library(epidatr)
pub_flusurv(
  locations = "network_all",
  issues = epirange(as.Date("1234-01-01"), as.Date("3456-01-01"))
)
#> # A tibble: 0 × 0
#> Warning message:
#> epidata warning: `no results` 

(This only sometimes seems to give a warning about empty data? Maybe only when not caching?)

Alternatively, some sort of standardization might make this unnecessary.