Skip to content

Commit

Permalink
update documentation about scores to specify it is a tibble with scor…
Browse files Browse the repository at this point in the history
…ingutils named outputs as colnames
  • Loading branch information
kaitejohnson committed Jul 20, 2024
1 parent e2a0c88 commit 2d816ff
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 18 deletions.
6 changes: 4 additions & 2 deletions wweval/R/ms_fig3.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#' Make head to head CRPS distribution comparison plot for a single location
#'
#' @param scores A tibble of scores by location, forecast date, date and model,
#' the ouput of `scoringutils::score()` on samples.
#' containing the outputs of `scoringutils::score()` on samples plus metadata
#' transformed into a tibble.
#' @param loc_to_plot A string indicating the state abbreviations of the state
#' to plot
#' @param horizons_to_show A vector of strings indicating the names of the
Expand Down Expand Up @@ -199,7 +200,8 @@ make_fig3_forecast_comp_fig <- function(hosp_quantiles,
#' Make CRPS underlay figure
#'
#' @param scores A tibble of scores by location, forecast date, date and model,
#' the ouput of `scoringutils::score()` on samples.
#' containing the outputs of `scoringutils::score()` on samples plus metadata
#' transformed into a tibble.
#' @param loc_to_plot A string indicating the state abbreviations of the state
#' to plot
#' @param horizon_to_plot A string indicating what horizon period to plot,
Expand Down
21 changes: 14 additions & 7 deletions wweval/R/ms_fig4.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#' Make a CRPS density plot for a subset of locations
#'
#' @param scores A tibble of scores by location, forecast date, date and model,
#' the ouput of `scoringutils::score()` on samples.
#' containing the outputs of `scoringutils::score()` on samples plus metadata
#' transformed into a tibble.
#' @param horizons_to_show A vector of strings indicating the names of the
#' `horizon` that we want to show on the plot, must be a subset of
#' `nowcast`, `1 wk`, `2 wks`,`3 wks`, `4 wks` and `overall`
Expand Down Expand Up @@ -88,7 +89,8 @@ make_fig4_crps_density <- function(scores,
#' over time
#'
#' @param scores A tibble of scores by location, forecast date, date and model,
#' the ouput of `scoringutils::score()` on samples.
#' containing the outputs of `scoringutils::score()` on samples plus metadata
#' transformed into a tibble.
#' @param eval_hosp_data The retrospective hospital admissions data for each
#' state and for all dates, used to generate national hospital admissions
#' @param days_to_show_prev_data An ingeger indicating how many days before the
Expand Down Expand Up @@ -172,7 +174,8 @@ make_fig4_pct_better_w_ww <- function(scores,
#' Make figure that stratifies scores by location across forecast dates
#'
#' @param scores A tibble of scores by location, forecast date, date and model,
#' the ouput of `scoringutils::score()` on samples.
#' containing the outputs of `scoringutils::score()` on samples plus metadata
#' transformed into a tibble.
#' @param horizons_to_show A vector of strings indicating the names of the
#' `horizon` that we want to show on the plot, must be a subset of
#' `nowcast`, `1 wk`, `2 wks`,`3 wks`, `4 wks` and `overall`
Expand Down Expand Up @@ -253,7 +256,8 @@ make_fig4_rel_crps_by_location <- function(scores,
#' Make figure that stratifies across location and forecast dates
#'
#' @param scores A tibble of scores by location, forecast date, date and model,
#' the ouput of `scoringutils::score()` on samples.
#' containing the outputs of `scoringutils::score()` on samples plus metadata
#' transformed into a tibble.
#' @param horizons_to_show A vector of strings indicating the names of the
#' `horizon` that we want to show on the plot, must be a subset of
#' `nowcast`, `1 wk`, `2 wks`,`3 wks`, `4 wks` and `overall`
Expand Down Expand Up @@ -337,7 +341,8 @@ make_fig4_rel_crps_overall <- function(scores,
#'
#'
#' @param scores_quantiles A tibble of scores by location, forecast date,
#' date and model, the ouput of `scoringutils::score()` on the quantiles.
#' date and model, containing the outputs of `scoringutils::score()` on
#' quantiles plus metadata transformed into a tibble.
#'
#' @return a ggplot object with the overall QQ plot colored by model.
#' @export
Expand All @@ -354,7 +359,8 @@ make_qq_plot_overall <- function(scores_quantiles) {
#' Plot coverage at specified ranges
#'
#' @param scores_quantiles A tibble of scores by location, forecast date,
#' date and model, the ouput of `scoringutils::score()` on the quantiles.
#' date and model, containing the outputs of `scoringutils::score()` on
#' quantiles plus metadata transformed into a tibble.
#'
#' @param ranges A numeric vector of credible interval ranges to plot.
#'
Expand Down Expand Up @@ -401,7 +407,8 @@ make_plot_coverage_range <- function(scores_quantiles, ranges) {
#' Make figure that stratifies scores by epidemic phase across
#'
#' @param scores A tibble of scores by location, forecast date, date and model,
#' the ouput of `scoringutils::score()` on samples.
#' containing the outputs of `scoringutils::score()` on samples plus metadata
#' transformed into a tibble.
#' @param horizons_to_show A vector of strings indicating the names of the
#' `horizon` that we want to show on the plot, must be a subset of
#' `nowcast`, `1 wk`, `2 wks`,`3 wks`, `4 wks` and `overall`
Expand Down
3 changes: 2 additions & 1 deletion wweval/man/make_fig3_crps_underlay_fig.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_fig3_single_loc_comp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_fig4_crps_density.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_fig4_pct_better_w_ww.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_fig4_rel_crps_by_location.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_fig4_rel_crps_by_phase.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_fig4_rel_crps_overall.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_plot_coverage_range.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion wweval/man/make_qq_plot_overall.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d816ff

Please sign in to comment.