HopkinsIDD / flepiMoP

The Flexible Epidemic Modeling Pipeline
https://flepimop.org
GNU General Public License v3.0
9 stars 4 forks source link

[Bug]: Upgrade `flepicommon`'s `covidcast` Dependency To `epidatr` #332

Open TimothyWillard opened 1 month ago

TimothyWillard commented 1 month ago

Label

bug

Priority Label

medium priority

Describe the bug/issue

The covidcast package provided by the Delphi group has been deprecated: https://github.com/cmu-delphi/covidcast?tab=readme-ov-file#api-clients. The suggested replacement is the epidatr package and I think the corresponding replacement for covidcast::covidcast_signal is epidatr::pub_covidcast: https://cmu-delphi.github.io/epidatr/reference/pub_covidcast.html.

To Reproduce

Current references to the covidcast package, looks like flepimop/R_packages//flepicommon/R/DataUtils.R:781 is the only real one:

(venv) twillard@epid-iss-mbp ~/D/G/H/flepiMoP (main)> grep -rn flepimop/R_packages/ -e "covidcast"
flepimop/R_packages//flepicommon/R/DataUtils.R:694:#' get_covidcast_data
flepimop/R_packages//flepicommon/R/DataUtils.R:703:#' @import covidcast dplyr lubridate doParallel foreach vroom purrr
flepimop/R_packages//flepicommon/R/DataUtils.R:708:get_covidcast_data <- function(
flepimop/R_packages//flepicommon/R/DataUtils.R:770:                            .packages = c("covidcast","dplyr","lubridate", "doParallel","foreach","vroom","purrr"),
flepimop/R_packages//flepicommon/R/DataUtils.R:781:                                                 covidcast::covidcast_signal(data_source = ifelse(grepl("admissions", x), "hhs", "jhu-csse"),
flepimop/R_packages//flepicommon/R/DataUtils.R:921:    } else if(source == "covidcast" & scale == "US state"){
flepimop/R_packages//flepicommon/R/DataUtils.R:923:        # define covidcast signals
flepimop/R_packages//flepicommon/R/DataUtils.R:930:        rc <- get_covidcast_data(geo_level = "state",
flepimop/R_packages//flepicommon/NAMESPACE:20:export(get_covidcast_data)
flepimop/R_packages//flepicommon/NAMESPACE:28:import(covidcast)
flepimop/R_packages//flepicommon/DESCRIPTION:25:    covidcast,

Environment, if relevant

Git commit: a51a07408c34a258ee2d594a4f040cce94dcb52d

pearsonca commented 1 month ago

next step version: we should consider spinning this out into a private package for data fetching. I don't see the value in a (public facing) collection of data munging scripts.

TimothyWillard commented 1 month ago

next step version: we should consider spinning this out into a private package for data fetching. I don't see the value in a (public facing) collection of data munging scripts.

I don't think this is relevant to the issue described above, please file a separate issue. We shouldn't be depending on deprecated packages, whether it's for an public/private API.

pearsonca commented 1 month ago

I don't think this is relevant to the issue described above, please file a separate issue. We shouldn't be depending on deprecated packages, whether it's for an public/private API.

Agree - done!