Skip to content

Commit b1d1630

Browse files
dajmcdondsweber2
authored andcommitted
pass local checks
1 parent b7b4416 commit b1d1630

5 files changed

+14
-19
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ export(rename)
202202
export(select)
203203
export(slather)
204204
export(smooth_quantile_reg)
205-
export(snap)
206205
export(step_adjust_latency)
207206
export(step_climate)
208207
export(step_epi_ahead)

R/make_smooth_quantile_reg.R

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@
4141
#' )
4242
#' pl <- pl %>%
4343
#' unnest(.pred) %>%
44-
#' mutate(distn = nested_quantiles(distn)) %>%
45-
#' unnest(distn) %>%
44+
#' pivot_quantiles_wider(distn) %>%
4645
#' mutate(
4746
#' x = x[length(x) - 20] + ahead / 100 * 2 * pi,
4847
#' ahead = NULL
49-
#' ) %>%
50-
#' pivot_wider(names_from = distn_quantile_levels, values_from = distn_value)
48+
#' )
5149
#' plot(x, y, pch = 16, xlim = c(pi, 2 * pi), col = "lightgrey")
5250
#' curve(sin(x), add = TRUE)
5351
#' abline(v = fd, lty = 2)
@@ -57,11 +55,11 @@
5755
#'
5856
#' library(ggplot2)
5957
#' ggplot(data.frame(x = x, y = y), aes(x)) +
60-
#' geom_ribbon(data = pl, aes(ymin = `0.2`, ymax = `0.8`), fill = "lightblue") +
58+
#' geom_ribbon(data = pl, aes(ymin = `0.2`, ymax = `0.8`), fill = "cornflowerblue") +
6159
#' geom_point(aes(y = y), colour = "grey") + # observed data
6260
#' geom_function(fun = sin, colour = "black") + # truth
6361
#' geom_vline(xintercept = fd, linetype = "dashed") + # end of training data
64-
#' geom_line(data = pl, aes(y = `0.5`), colour = "red") + # median prediction
62+
#' geom_line(data = pl, aes(y = `0.5`), colour = "orange") + # median prediction
6563
#' theme_bw() +
6664
#' coord_cartesian(xlim = c(0, NA)) +
6765
#' ylab("y")

R/weighted_interval_score.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
#'
5353
#' # Using some actual forecasts --------
5454
#' library(dplyr)
55-
#' jhu <- case_death_rate_subset %>%
55+
#' training <- covid_case_death_rates %>%
5656
#' filter(time_value >= "2021-10-01", time_value <= "2021-12-01")
5757
#' preds <- flatline_forecaster(
58-
#' jhu, "death_rate",
58+
#' training, "death_rate",
5959
#' flatline_args_list(quantile_levels = c(.01, .025, 1:19 / 20, .975, .99))
6060
#' )$predictions
61-
#' actuals <- case_death_rate_subset %>%
61+
#' actuals <- covid_case_death_rates %>%
6262
#' filter(time_value == as.Date("2021-12-01") + 7) %>%
6363
#' select(geo_value, time_value, actual = death_rate)
6464
#' preds <- left_join(preds, actuals,

man/smooth_quantile_reg.Rd

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/weighted_interval_score.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)