diff --git a/DESCRIPTION b/DESCRIPTION index 4b5efe120..30e0e5ac9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -49,7 +49,6 @@ Imports: vctrs, workflows (>= 1.0.0) Suggests: - covidcast, data.table, epidatr (>= 1.0.0), fs, @@ -61,6 +60,7 @@ Suggests: quantreg, ranger, RcppRoll, + readr, rmarkdown, smoothqr, testthat (>= 3.0.0), diff --git a/data-raw/case_death_rate_subset.R b/data-raw/case_death_rate_subset.R index 4bf416dbf..4fa3e64a7 100644 --- a/data-raw/case_death_rate_subset.R +++ b/data-raw/case_death_rate_subset.R @@ -1,9 +1,8 @@ library(tidyverse) -library(covidcast) library(epidatr) library(epiprocess) -x <- covidcast( +x <- pub_covidcast( data_source = "jhu-csse", signals = "confirmed_7dav_incidence_prop", time_type = "day", @@ -11,10 +10,9 @@ x <- covidcast( time_values = epirange(20201231, 20211231), geo_values = "*" ) %>% - fetch() %>% select(geo_value, time_value, case_rate = value) -y <- covidcast( +y <- pub_covidcast( data_source = "jhu-csse", signals = "deaths_7dav_incidence_prop", time_type = "day", @@ -22,7 +20,6 @@ y <- covidcast( time_values = epirange(20201231, 20211231), geo_values = "*" ) %>% - fetch() %>% select(geo_value, time_value, death_rate = value) case_death_rate_subset <- x %>% diff --git a/data-raw/state_census.R b/data-raw/state_census.R index 22dde5a41..cfa74d38b 100644 --- a/data-raw/state_census.R +++ b/data-raw/state_census.R @@ -1,11 +1,10 @@ library(dplyr) library(tidyr) -state_census <- covidcast::state_census %>% +state_census <- readr::read_csv("https://github.com/cmu-delphi/covidcast/raw/c89e4d295550ba1540d64d2cc991badf63ad04e5/Python-packages/covidcast-py/covidcast/geo_mappings/state_census.csv") %>% # nolint: line_length_linter select(STATE, NAME, POPESTIMATE2019, ABBR) %>% rename(abbr = ABBR, name = NAME, pop = POPESTIMATE2019, fips = STATE) %>% mutate(abbr = tolower(abbr)) %>% as_tibble() - usethis::use_data(state_census, overwrite = TRUE)