reichlab / covidHubUtils

Utility functions for the COVID-19 forecast hub
http://reichlab.io/covidHubUtils/
17 stars 16 forks source link

Up-to-date weekly flu hospitalisation data is not accessible through `load_truth()` #403

Open nikosbosse opened 8 months ago

nikosbosse commented 8 months ago

I was trying to load up-to-date weekly hospitalisation data using

covidHubUtils::load_truth(
  hub = "FluSight",
  target_variable = "inc flu hosp", 
  temporal_resolution = "weekly", 
  location = "United States"
) 

This internally calls load_from_hub_repo() which in turn calls get_truth_path(). The file_path that is returned is this one: "https://raw.githubusercontent.com/cdcepi/Flusight-forecast-data/master/data-truth/truth-Incident%20Hospitalizations.csv". This file, however, only has data until 2023-11-11.

If I'm not mistaken, it seems like the most up-to-date data could/should be fetched from "https://github.com/cdcepi/FluSight-forecast-hub/blob/main/target-data/target-hospital-admissions.csv" instead. This would require an update to load_from_hub_repo() (updating the repo_path passed to get_truth_path()) and an update to get_truth_path() (updating the folder path).