Skip to content

Commit 7b6895d

Browse files
committed
replace all case_death_rate_subset references
1 parent b04855a commit 7b6895d

File tree

96 files changed

+152
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+152
-201
lines changed

R/arx_classifier.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#'
2828
#' @examples
2929
#' library(dplyr)
30-
#' jhu <- case_death_rate_subset %>%
30+
#' jhu <- covid_case_death_rates %>%
3131
#' filter(time_value >= as.Date("2021-11-01"))
3232
#'
3333
#' out <- arx_classifier(jhu, "death_rate", c("case_rate", "death_rate"))
@@ -97,7 +97,7 @@ arx_classifier <- function(
9797
#' @seealso [arx_classifier()]
9898
#' @examples
9999
#' library(dplyr)
100-
#' jhu <- case_death_rate_subset %>%
100+
#' jhu <- covid_case_death_rates %>%
101101
#' filter(time_value >= as.Date("2021-11-01"))
102102
#'
103103
#' arx_class_epi_workflow(jhu, "death_rate", c("case_rate", "death_rate"))

R/arx_forecaster.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#' @seealso [arx_fcast_epi_workflow()], [arx_args_list()]
2626
#'
2727
#' @examples
28-
#' jhu <- case_death_rate_subset %>%
28+
#' jhu <- covid_case_death_rates %>%
2929
#' dplyr::filter(time_value >= as.Date("2021-12-01"))
3030
#'
3131
#' out <- arx_forecaster(
@@ -92,7 +92,7 @@ arx_forecaster <- function(
9292
#'
9393
#' @examples
9494
#' library(dplyr)
95-
#' jhu <- case_death_rate_subset %>%
95+
#' jhu <- covid_case_death_rates %>%
9696
#' filter(time_value >= as.Date("2021-12-01"))
9797
#'
9898
#' arx_fcast_epi_workflow(

R/autoplot.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ggplot2::autoplot
2929
#' @name autoplot-epipred
3030
#' @examples
3131
#' library(dplyr)
32-
#' jhu <- case_death_rate_subset %>%
32+
#' jhu <- covid_case_death_rates %>%
3333
#' filter(time_value >= as.Date("2021-11-01"))
3434
#'
3535
#' r <- epi_recipe(jhu) %>%
@@ -70,7 +70,7 @@ ggplot2::autoplot
7070
#'
7171
#' # ------- Plotting canned forecaster output
7272
#'
73-
#' jhu <- case_death_rate_subset %>%
73+
#' jhu <- covid_case_death_rates %>%
7474
#' filter(time_value >= as.Date("2021-11-01"))
7575
#' flat <- flatline_forecaster(jhu, "death_rate")
7676
#' autoplot(flat, .max_facets = 4)

R/cdc_baseline_forecaster.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#'
2424
#' @examples
2525
#' library(dplyr)
26-
#' weekly_deaths <- case_death_rate_subset %>%
26+
#' weekly_deaths <- covid_case_death_rates %>%
2727
#' select(geo_value, time_value, death_rate) %>%
2828
#' left_join(state_census %>% select(pop, abbr), by = c("geo_value" = "abbr")) %>%
2929
#' mutate(deaths = pmax(death_rate / 1e5 * pop * 7, 0)) %>%

R/epi_recipe.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ epi_recipe.default <- function(x, ...) {
4848
#' @examples
4949
#' library(dplyr)
5050
#' library(recipes)
51-
#' jhu <- case_death_rate_subset %>%
51+
#' jhu <- covid_case_death_rates %>%
5252
#' filter(time_value > "2021-08-01") %>%
5353
#' arrange(geo_value, time_value)
5454
#'
@@ -270,7 +270,7 @@ is_epi_recipe <- function(x) {
270270
#' library(dplyr)
271271
#' library(recipes)
272272
#'
273-
#' jhu <- case_death_rate_subset %>%
273+
#' jhu <- covid_case_death_rates %>%
274274
#' filter(time_value > "2021-08-01") %>%
275275
#' arrange(geo_value, time_value)
276276
#'
@@ -354,7 +354,7 @@ update_epi_recipe <- function(x, recipe, ..., blueprint = default_epi_recipe_blu
354354
#' library(dplyr)
355355
#' library(workflows)
356356
#'
357-
#' jhu <- case_death_rate_subset %>%
357+
#' jhu <- covid_case_death_rates %>%
358358
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
359359
#' r <- epi_recipe(jhu) %>%
360360
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%

R/epi_workflow.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#' @importFrom generics augment
2121
#' @export
2222
#' @examples
23-
#' jhu <- case_death_rate_subset
23+
#' jhu <- covid_case_death_rates
2424
#'
2525
#' r <- epi_recipe(jhu) %>%
2626
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
@@ -84,7 +84,7 @@ is_epi_workflow <- function(x) {
8484
#' @name fit-epi_workflow
8585
#' @export
8686
#' @examples
87-
#' jhu <- case_death_rate_subset %>%
87+
#' jhu <- covid_case_death_rates %>%
8888
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
8989
#'
9090
#' r <- epi_recipe(jhu) %>%
@@ -139,7 +139,7 @@ fit.epi_workflow <- function(object, data, ..., control = workflows::control_wor
139139
#' @name predict-epi_workflow
140140
#' @export
141141
#' @examples
142-
#' jhu <- case_death_rate_subset
142+
#' jhu <- covid_case_death_rates
143143
#'
144144
#' r <- epi_recipe(jhu) %>%
145145
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%

R/flatline_forecaster.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#' @export
2525
#'
2626
#' @examples
27-
#' jhu <- case_death_rate_subset %>%
27+
#' jhu <- covid_case_death_rates %>%
2828
#' dplyr::filter(time_value >= as.Date("2021-12-01"))
2929
#'
3030
#' out <- flatline_forecaster(jhu, "death_rate")

R/flusight_hub_formatter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ abbr_to_location <- function(abbr) {
5757
#'
5858
#' @examples
5959
#' library(dplyr)
60-
#' weekly_deaths <- case_death_rate_subset %>%
60+
#' weekly_deaths <- covid_case_death_rates %>%
6161
#' filter(
6262
#' time_value >= as.Date("2021-09-01"),
6363
#' geo_value %in% c("ca", "ny", "dc", "ga", "vt")

R/frosting.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#'
1010
#' @examples
1111
#' library(dplyr)
12-
#' jhu <- case_death_rate_subset %>%
12+
#' jhu <- covid_case_death_rates %>%
1313
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
1414
#' r <- epi_recipe(jhu) %>%
1515
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
@@ -128,7 +128,7 @@ update_frosting <- function(x, frosting, ...) {
128128
#' @export
129129
#' @examples
130130
#' library(dplyr)
131-
#' jhu <- case_death_rate_subset %>%
131+
#' jhu <- covid_case_death_rates %>%
132132
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
133133
#' r <- epi_recipe(jhu) %>%
134134
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
@@ -268,7 +268,7 @@ new_frosting <- function() {
268268
#' wf <- epi_workflow() %>% add_frosting(f)
269269
#'
270270
#' # A more realistic example
271-
#' jhu <- case_death_rate_subset %>%
271+
#' jhu <- covid_case_death_rates %>%
272272
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
273273
#'
274274
#' r <- epi_recipe(jhu) %>%

R/get_test_data.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
#' keys, as well other variables in the original dataset.
3636
#' @examples
3737
#' # create recipe
38-
#' rec <- epi_recipe(case_death_rate_subset) %>%
38+
#' rec <- epi_recipe(covid_case_death_rates) %>%
3939
#' step_epi_ahead(death_rate, ahead = 7) %>%
4040
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
4141
#' step_epi_lag(case_rate, lag = c(0, 7, 14))
42-
#' get_test_data(recipe = rec, x = case_death_rate_subset)
42+
#' get_test_data(recipe = rec, x = covid_case_death_rates)
4343
#' @importFrom rlang %@%
4444
#' @export
4545
get_test_data <- function(

R/layer_add_forecast_date.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#' @export
2121
#' @examples
2222
#' library(dplyr)
23-
#' jhu <- case_death_rate_subset %>%
23+
#' jhu <- covid_case_death_rates %>%
2424
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
2525
#' r <- epi_recipe(jhu) %>%
2626
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%

R/layer_add_target_date.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#' @export
2222
#' @examples
2323
#' library(dplyr)
24-
#' jhu <- case_death_rate_subset %>%
24+
#' jhu <- covid_case_death_rates %>%
2525
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
2626
#' r <- epi_recipe(jhu) %>%
2727
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%

R/layer_cdc_flatline_quantiles.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,22 @@
5656
#'
5757
#' @examples
5858
#' library(dplyr)
59-
#' r <- epi_recipe(case_death_rate_subset) %>%
59+
#' r <- epi_recipe(covid_case_death_rates) %>%
6060
#' # data is "daily", so we fit this to 1 ahead, the result will contain
6161
#' # 1 day ahead residuals
6262
#' step_epi_ahead(death_rate, ahead = 1L, skip = TRUE) %>%
6363
#' recipes::update_role(death_rate, new_role = "predictor") %>%
6464
#' recipes::add_role(time_value, geo_value, new_role = "predictor")
6565
#'
66-
#' forecast_date <- max(case_death_rate_subset$time_value)
66+
#' forecast_date <- max(covid_case_death_rates$time_value)
6767
#'
6868
#' f <- frosting() %>%
6969
#' layer_predict() %>%
7070
#' layer_cdc_flatline_quantiles(aheads = c(7, 14, 21, 28), symmetrize = TRUE)
7171
#'
7272
#' eng <- linear_reg(engine = "flatline")
7373
#'
74-
#' wf <- epi_workflow(r, eng, f) %>% fit(case_death_rate_subset)
74+
#' wf <- epi_workflow(r, eng, f) %>% fit(covid_case_death_rates)
7575
#' preds <- forecast(wf) %>%
7676
#' select(-time_value) %>%
7777
#' mutate(forecast_date = forecast_date)
@@ -91,7 +91,7 @@
9191
#' geom_ribbon(aes(ymin = `0.25`, ymax = `0.75`), fill = blues9[6]) +
9292
#' geom_line(aes(y = .pred), color = "orange") +
9393
#' geom_line(
94-
#' data = case_death_rate_subset %>% filter(geo_value %in% four_states),
94+
#' data = covid_case_death_rates %>% filter(geo_value %in% four_states),
9595
#' aes(x = time_value, y = death_rate)
9696
#' ) +
9797
#' scale_x_date(limits = c(forecast_date - 90, forecast_date + 30)) +

R/layer_naomit.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' @export
1313
#' @examples
1414
#' library(dplyr)
15-
#' jhu <- case_death_rate_subset %>%
15+
#' jhu <- covid_case_death_rates %>%
1616
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
1717
#'
1818
#' r <- epi_recipe(jhu) %>%

R/layer_point_from_distn.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#'
1818
#' @examples
1919
#' library(dplyr)
20-
#' jhu <- case_death_rate_subset %>%
20+
#' jhu <- covid_case_death_rates %>%
2121
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
2222
#'
2323
#' r <- epi_recipe(jhu) %>%

R/layer_predict.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#'
1818
#' @examples
1919
#' library(dplyr)
20-
#' jhu <- case_death_rate_subset %>%
20+
#' jhu <- covid_case_death_rates %>%
2121
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
2222
#'
2323
#' r <- epi_recipe(jhu) %>%

R/layer_predictive_distn.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#'
2222
#' @examples
2323
#' library(dplyr)
24-
#' jhu <- case_death_rate_subset %>%
24+
#' jhu <- covid_case_death_rates %>%
2525
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
2626
#'
2727
#' r <- epi_recipe(jhu) %>%

R/layer_quantile_distn.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#'
2424
#' @examples
2525
#' library(dplyr)
26-
#' jhu <- case_death_rate_subset %>%
26+
#' jhu <- covid_case_death_rates %>%
2727
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
2828
#'
2929
#' r <- epi_recipe(jhu) %>%

R/layer_residual_quantiles.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' @export
1616
#' @examples
1717
#' library(dplyr)
18-
#' jhu <- case_death_rate_subset %>%
18+
#' jhu <- covid_case_death_rates %>%
1919
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
2020
#'
2121
#' r <- epi_recipe(jhu) %>%

R/layer_threshold_preds.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' @export
2424
#' @examples
2525
#' library(dplyr)
26-
#' jhu <- case_death_rate_subset %>%
26+
#' jhu <- covid_case_death_rates %>%
2727
#' filter(time_value < "2021-03-08", geo_value %in% c("ak", "ca", "ar"))
2828
#' r <- epi_recipe(jhu) %>%
2929
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%

R/layers.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ layer <- function(subclass, ..., .prefix = "layer_") {
4242
#'
4343
#' @examples
4444
#' library(dplyr)
45-
#' jhu <- case_death_rate_subset %>%
45+
#' jhu <- covid_case_death_rates %>%
4646
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
4747
#' r <- epi_recipe(jhu) %>%
4848
#' step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%

R/make_grf_quantiles.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#' # -- a more complicated task
6262
#'
6363
#' library(dplyr)
64-
#' dat <- case_death_rate_subset %>%
64+
#' dat <- covid_case_death_rates %>%
6565
#' filter(time_value > as.Date("2021-10-01"))
6666
#' rec <- epi_recipe(dat) %>%
6767
#' step_epi_lag(case_rate, death_rate, lag = c(0, 7, 14)) %>%

R/model-methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#' @export
3434
#' @examples
3535
#' library(dplyr)
36-
#' jhu <- case_death_rate_subset %>%
36+
#' jhu <- covid_case_death_rates %>%
3737
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
3838
#'
3939
#' r <- epi_recipe(jhu) %>%

R/pivot_quantiles.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' @examples
99
#' library(dplyr)
1010
#' library(tidyr)
11-
#' edf <- case_death_rate_subset[1:3, ]
11+
#' edf <- covid_case_death_rates[1:3, ]
1212
#' edf$q <- dist_quantiles(list(1:5, 2:4, 3:10), list(1:5 / 6, 2:4 / 5, 3:10 / 11))
1313
#'
1414
#' edf_nested <- edf %>% mutate(q = nested_quantiles(q))

R/step_epi_naomit.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' of data loss.
99
#' @export
1010
#' @examples
11-
#' case_death_rate_subset %>%
11+
#' covid_case_death_rates %>%
1212
#' epi_recipe() %>%
1313
#' step_epi_naomit()
1414
step_epi_naomit <- function(recipe) {

R/step_epi_shift.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#' @rdname step_epi_shift
4343
#' @export
4444
#' @examples
45-
#' r <- epi_recipe(case_death_rate_subset) %>%
45+
#' r <- epi_recipe(covid_case_death_rates) %>%
4646
#' step_epi_ahead(death_rate, ahead = 7) %>%
4747
#' step_epi_lag(death_rate, lag = c(0, 7, 14))
4848
#' r

R/step_epi_slide.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#' @export
3333
#' @examples
3434
#' library(dplyr)
35-
#' jhu <- case_death_rate_subset %>%
35+
#' jhu <- covid_case_death_rates %>%
3636
#' filter(time_value >= as.Date("2021-01-01"), geo_value %in% c("ca", "ny"))
3737
#' rec <- epi_recipe(jhu) %>%
3838
#' step_epi_slide(case_rate, death_rate,

R/step_growth_rate.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
#' @importFrom epiprocess growth_rate
3333
#' @export
3434
#' @examples
35-
#' r <- epi_recipe(case_death_rate_subset) %>%
35+
#' r <- epi_recipe(covid_case_death_rates) %>%
3636
#' step_growth_rate(case_rate, death_rate)
3737
#' r
3838
#'
3939
#' r %>%
40-
#' prep(case_death_rate_subset) %>%
41-
#' bake(case_death_rate_subset)
40+
#' prep(covid_case_death_rates) %>%
41+
#' bake(covid_case_death_rates)
4242
step_growth_rate <-
4343
function(recipe,
4444
...,

R/step_lag_difference.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
#' @family row operation steps
1616
#' @export
1717
#' @examples
18-
#' r <- epi_recipe(case_death_rate_subset) %>%
18+
#' r <- epi_recipe(covid_case_death_rates) %>%
1919
#' step_lag_difference(case_rate, death_rate, horizon = c(7, 14)) %>%
2020
#' step_epi_naomit()
2121
#' r
2222
#'
2323
#' r %>%
24-
#' prep(case_death_rate_subset) %>%
25-
#' bake(case_death_rate_subset)
24+
#' prep(covid_case_death_rates) %>%
25+
#' bake(covid_case_death_rates)
2626
step_lag_difference <-
2727
function(recipe,
2828
...,

R/tidy.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#'
2828
#' @examples
2929
#' library(dplyr)
30-
#' jhu <- case_death_rate_subset %>%
30+
#' jhu <- covid_case_death_rates %>%
3131
#' filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
3232
#'
3333
#' r <- epi_recipe(jhu) %>%

0 commit comments

Comments
 (0)