get_zoltar_predictions: Get predictions from a COVID forecaster in Zoltar

Description Usage Arguments Details Value See Also

View source: R/get_zoltar_predictions.R

Description

Simply converts the predictions of forecasters submitting to the COVID Hub to the format of a predictions card, so it can be easily evaluated and compared.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
get_zoltar_predictions(
  forecaster_names = NULL,
  forecast_dates = NULL,
  geo_values = "*",
  forecast_type = c("point", "quantile"),
  ahead = 1:4,
  incidence_period = c("epiweek", "day"),
  signal = c("confirmed_incidence_num", "deaths_incidence_num",
    "deaths_cumulative_num"),
  as_of = NULL
)

Arguments

forecaster_names

Vector of strings indicating of the forecaster(s) (matching what it is called on the COVID Hub).

forecast_dates

Vector of Date objects (or strings of the form "YYYY-MM-DD") indicating dates on which forecasts will be made. If NULL, the default, then all currently available forecast dates from the given forecaster in the COVID Hub will be used.

geo_values

vector of character strings containing FIPS codes of counties, or lower case state abbreviations (or "us" for national). The default "*" fetches all available locations

forecast_type

"quantile", "point" or both (the default)

ahead

number of periods ahead for which the forecast is required. NULL will fetch all available aheads

incidence_period

one of "epiweek" or "day". NULL will attempt to fetch both

signal

this function supports only "confirmed_incidence_num", "deaths_incidence_num", and/or "deaths_cumulative_num" (those currently) forecast by the COVIDhub-ensemble). For other types, use one of the alternatives mentioned above

as_of

only forecasts available as of this date will be retrieved. Default (NULL) is effectively as of today

Details

Note: For greater flexibility, use zoltr::do_zoltar_query() or perhaps covidHubUtils::load_forecasts().

Value

Long data frame of forecasts with a class of predictions_cards. The first 4 columns are the same as those returned by the forecaster. The remainder specify the prediction task, 10 columns in total: ahead, geo_value, quantile, value, forecaster, forecast_date, data_source, signal, target_end_date, and incidence_period. Here data_source and signal correspond to the response variable only.

See Also

get_predictions()

get_covidhub_predictions()


dshemetov/evalcast-mirror documentation built on Feb. 4, 2022, 8:52 a.m.