load_covid_forecasts_relative_horizon: Load multiple models' last forecasts from multiple weeks and...

View source: R/qra_fit_convenience.R

load_covid_forecasts_relative_horizonR Documentation

Load multiple models' last forecasts from multiple weeks and adjust the targets for daily forecasts to be relative to the Monday on or after submission.

Description

Load multiple models' last forecasts from multiple weeks and adjust the targets for daily forecasts to be relative to the Monday on or after submission.

Usage

load_covid_forecasts_relative_horizon(
  hub = "US",
  source = "local_hub_repo",
  hub_repo_path,
  data_processed_subpath = "data-processed/",
  monday_dates,
  as_of = NULL,
  model_abbrs,
  timezero_window_size,
  locations,
  targets,
  max_horizon,
  required_quantiles
)

Arguments

hub

character vector, where the first element indicates the hub from which to load forecasts. Possible options are "US" and "ECDC"

source

string specifying where forecasts will be loaded from: either "local_hub_repo" or "zoltar"

hub_repo_path

path to local clone of the reichlab/covid19-forecast-hub repository to be used when source is local_hub_repo

monday_dates

Date vector of Mondays that are submission deadlines

as_of

"as_of" date passed to zoltar Ignored if source is "local_hub_repo".

model_abbrs

Character vector of model abbreviations

timezero_window_size

The number of days back to go. A window size of 0 will retrieve only forecasts submitted on the last_timezero date.

locations

character vector of locations; FIPS codes

targets

character vector of targets to retrieve, for example c('1 wk ahead cum death', '2 wk ahead cum death')

max_horizon

maximum horizon of forecasts to return, where horizon is relative to the reference dates for the forecasts (Saturdays for forecasts of weekly targets or Mondays for daily targets)

required_quantiles

numeric vector of quantiles component models are required to have submitted

Value

data frame with ensemble forecasts by location


reichlab/covidEnsembles documentation built on Jan. 31, 2024, 7:21 p.m.