Skip to content

Commit e53af97

Browse files
authored
Merge pull request #402 from cmu-delphi/ds/file
refactor: remove Suggests dependence on covidcast
2 parents a415100 + 57df54c commit e53af97

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Imports:
4949
vctrs,
5050
workflows (>= 1.0.0)
5151
Suggests:
52-
covidcast,
5352
data.table,
5453
epidatr (>= 1.0.0),
5554
fs,
@@ -61,6 +60,7 @@ Suggests:
6160
quantreg,
6261
ranger,
6362
RcppRoll,
63+
readr,
6464
rmarkdown,
6565
smoothqr,
6666
testthat (>= 3.0.0),

data-raw/case_death_rate_subset.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
library(tidyverse)
2-
library(covidcast)
32
library(epidatr)
43
library(epiprocess)
54

6-
x <- covidcast(
5+
x <- pub_covidcast(
76
data_source = "jhu-csse",
87
signals = "confirmed_7dav_incidence_prop",
98
time_type = "day",
109
geo_type = "state",
1110
time_values = epirange(20201231, 20211231),
1211
geo_values = "*"
1312
) %>%
14-
fetch() %>%
1513
select(geo_value, time_value, case_rate = value)
1614

17-
y <- covidcast(
15+
y <- pub_covidcast(
1816
data_source = "jhu-csse",
1917
signals = "deaths_7dav_incidence_prop",
2018
time_type = "day",
2119
geo_type = "state",
2220
time_values = epirange(20201231, 20211231),
2321
geo_values = "*"
2422
) %>%
25-
fetch() %>%
2623
select(geo_value, time_value, death_rate = value)
2724

2825
case_death_rate_subset <- x %>%

data-raw/state_census.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
library(dplyr)
22
library(tidyr)
33

4-
state_census <- covidcast::state_census %>%
4+
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
55
select(STATE, NAME, POPESTIMATE2019, ABBR) %>%
66
rename(abbr = ABBR, name = NAME, pop = POPESTIMATE2019, fips = STATE) %>%
77
mutate(abbr = tolower(abbr)) %>%
88
as_tibble()
99

10-
1110
usethis::use_data(state_census, overwrite = TRUE)

0 commit comments

Comments
 (0)