From 44dc1b932b1fff9230fcb230462d7ad8f169bb50 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Wed, 2 Oct 2024 20:00:18 -0700 Subject: [PATCH] fix: add readr --- DESCRIPTION | 1 + data-raw/jhu_csse_county_level_subset.R | 2 +- vignettes/aggregation.Rmd | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f149e29e..3da259cf 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -57,6 +57,7 @@ Suggests: epidatr, knitr, outbreaks, + readr, rmarkdown, testthat (>= 3.1.5), withr diff --git a/data-raw/jhu_csse_county_level_subset.R b/data-raw/jhu_csse_county_level_subset.R index 4d9f3075..e28ba66b 100644 --- a/data-raw/jhu_csse_county_level_subset.R +++ b/data-raw/jhu_csse_county_level_subset.R @@ -2,7 +2,7 @@ library(epidatr) library(epiprocess) library(dplyr) -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 +y <- readr::read_csv("https://github.com/cmu-delphi/covidcast/raw/c89e4d295550ba1540d64d2cc991badf63ad04e5/Python-packages/covidcast-py/covidcast/geo_mappings/county_census.csv") %>% # nolint: line_length_linter filter(STNAME %in% c("Massachusetts", "Vermont"), STNAME != CTYNAME) %>% select(geo_value = FIPS, county_name = CTYNAME, state_name = STNAME) diff --git a/vignettes/aggregation.Rmd b/vignettes/aggregation.Rmd index f21eca49..07f3bba6 100644 --- a/vignettes/aggregation.Rmd +++ b/vignettes/aggregation.Rmd @@ -18,7 +18,7 @@ library(epiprocess) library(dplyr) # Use covidcast::county_census to get the county and state names -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 +y <- readr::read_csv("https://github.com/cmu-delphi/covidcast/raw/c89e4d295550ba1540d64d2cc991badf63ad04e5/Python-packages/covidcast-py/covidcast/geo_mappings/county_census.csv") %>% # nolint: line_length_linter filter(STNAME %in% c("Massachusetts", "Vermont"), STNAME != CTYNAME) %>% select(geo_value = FIPS, county_name = CTYNAME, state_name = STNAME) @@ -108,7 +108,7 @@ help avoid bugs in further downstream data processing tasks. Let's first remove certain dates from our data set to create gaps: ```{r} -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 +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)) %>%