Skip to contents

This function is used to plot a score card from the output of a bootstrap verification function such as bootstrap_verify.

Usage

plot_scorecard(
  bootstrap_data,
  fcst_model,
  ref_model,
  scores,
  facet_by = vars(score),
  num_facet_rows = 1,
  grid_facets = FALSE,
  filter_by = NULL,
  significance_breaks = c(-1.1, -0.997, -0.95, -0.68, 0.68, 0.95, 0.997, 1.1),
  colours = c("#CA0020", "#CA0020", "#CA0020", "grey70", "#0571B0", "#0571B0", "#0571B0"),
  fills = c("#CA0020", "#F4A582", NA, "grey70", NA, "#92C5DE", "#0571B0"),
  shapes = c(25, 25, 25, 22, 24, 24, 24),
  sizes = c(3, 2, 1, 0.5, 1, 2, 3),
  legend_labels = "auto",
  num_facet_cols = length(scores),
  ...
)

Arguments

bootstrap_data

The output from bootstrap_verify.

fcst_model

The forecast model of interest.

ref_model

The forecast model to be used as reference.

scores

Vector of scores to include in the plot.

facet_by

Column(s) to facet panels by - should be unquoted and wrapped in the vars function. Defaults to score.

filter_by

Filtering function - column names should be unquoted and everything wrapped inside the vars function.

significance_breaks

The breaks to for statistical significance of differences. Default is c(-1.1, -0.997, -0.95, -0.68, 0.68, 0.95, 0.997, 1.1).

colours

Vector of outline colours used for the scorecard symbols. Should be one fewer then significance_breaks. Can be colour names or HEX colours. Default is c("#CA0020", "#CA0020", "#CA0020", "grey70", "#0571B0", "#0571B0", "#0571B0").

fills

Vector of fill colours used for the scorecard symbols. Should be one fewer then significance_breaks. Can be colour names or HEX colours. Default is c("#CA0020", "#F4A582", NA, "grey70", NA, "#92C5DE", "#0571B0").

shapes

Vector of shapes used for the scorecard symbols. Should be one fewer then significance_breaks. Default is c(25, 25, 25, 22, 24, 24, 24).

sizes

Vector of sizes used for the scorecard symbols. Should be one fewer then significance_breaks. Default is c(3, 2, 1, 0.5, 1, 2, 3).

legend_labels

Character vector of labels to be used for the scorecard symbols. Should be one fewer then significance_breaks. Set to "auto" to automatically generate labels based on significance_breaks

num_facet_cols

Number of panel columns in the score card.

Value

A score card plot. Can be saved with ggsave