Skip to content

Commit 0c3070b

Browse files
authored
deps: remove covidcast dependency (#17)
* use covidcast state_census.csv directly rather than package
1 parent 2c45cc1 commit 0c3070b

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.Rbuildignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
^renv$
2+
^renv\.lock$
13
^.*\.Rproj$
24
^\.Rproj\.user$
35
^data-raw$

DESCRIPTION

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: epidatasets
33
Title: Epidemiological Data for Delphi Tooling Examples
4-
Version: 0.0.2
4+
Version: 0.0.3
55
Authors@R: c(
66
person(c("Daniel", "J."), "McDonald", , "[email protected]", role = "aut"),
77
person("Nat", "DeFries", , "[email protected]", role = c("cre", "aut")),
@@ -27,8 +27,7 @@ URL: https://github.com/cmu-delphi/epidatasets,
2727
https://cmu-delphi.github.io/epidatasets/
2828
Depends:
2929
R (>= 2.10)
30-
Suggests:
31-
covidcast,
30+
Suggests:
3231
data.table,
3332
dplyr,
3433
epidatr,

data-raw/covid_incidence_county_subset_tbl.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ source(here::here("data-raw/_helper.R"))
55

66
d <- as.Date("2024-03-20")
77

8-
# Previously, we were using `covidcast::county_census`, but covidcast is large and complicated to install (due to `sf` dependency). Instead, read the file directly from GitHub.
8+
# Previously, we were using `covidcast::county_census`, but covidcast is large
9+
# and complicated to install (due to `sf` dependency). Instead, read the file
10+
# directly from GitHub.
911
y <- read_csv("https://github.com/cmu-delphi/covidcast/raw/c89e4d295550ba1540d64d2cc991badf63ad04e5/Python-packages/covidcast-py/covidcast/geo_mappings/county_census.csv", # nolint: line_length_linter
1012
col_types = cols(
1113
FIPS = col_character(),

data-raw/state_census.R

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
library(dplyr)
22
library(covidcast)
33

4-
state_census <- covidcast::state_census %>%
4+
# Previously, we were using `covidcast::county_census`, but covidcast is large
5+
# and complicated to install (due to `sf` dependency). Instead, read the file
6+
# directly from GitHub.
7+
state_census <- read_csv("https://github.com/cmu-delphi/covidcast/raw/c89e4d295550ba1540d64d2cc991badf63ad04e5/Python-packages/covidcast-py/covidcast/geo_mappings/state_census.csv") %>% # nolint: line_length_linter
58
select(STATE, NAME, POPESTIMATE2019, ABBR) %>%
69
rename(abbr = ABBR, name = NAME, pop = POPESTIMATE2019, fips = STATE) %>%
710
# Left-pad FIPS codes with zeroes to 2 digits, and convert to character

0 commit comments

Comments
 (0)