Plot interval coverage

plot_coverage(
  predictions_cards,
  type = c("all", "one"),
  coverage = 0.8,
  facet_rows = c("forecaster"),
  facet_cols = c("forecast_date"),
  grp_vars = c("forecaster", "forecast_date", "ahead"),
  avg_vars = c("geo_value"),
  geo_type = c("county", "hrr", "msa", "dma", "state", "hhs", "nation"),
  backfill_buffer = 0
)

Arguments

predictions_cards

tibble of predictions that are all for the same prediction task, meaning they are for the same response, incidence period,and geo type. Forecasts may be for a different forecast date or forecaster. A predictions card may be created by the function get_predictions(), downloaded with get_covidhub_predictions() or possibly created manually.

type

One of "all" or "one", indicating whether to show coverage across all nominal levels (in which case averaging is performed across avg_vars) or whether to show it for one specific alpha value.

coverage

If type = "one", then coverage is the nominal interval coverage shown.

facet_rows

A variable name to facet data over. Creates a separate row of plots for each value of specified variable. Can be used with facet_cols to create a grid of plots.

facet_cols

Same as facet_rows, but with columns.

grp_vars

variables over which to compare coverage

avg_vars

variables over which we average to determine the proportion of coverage.

geo_type

String indicating geographical type, such as "county", or "state". See the COVIDcast Geographic Coding documentation for available options.

backfill_buffer

How many days until response is deemed trustworthy enough to be taken as correct?