Format quantile forecasts for a hubverse submission
Source:R/to_hubverse.R
get_hubverse_quantile_table.Rd
Format quantile forecasts for a hubverse submission
Usage
get_hubverse_quantile_table(
quantile_forecasts,
reference_date,
target_name,
quantile_value_col = "quantile_value",
quantile_level_col = "quantile_level",
location_col = "location",
timepoint_col = "target_end_date",
target_end_dates = NULL,
horizons = NULL,
horizon_timescale = c("days", "weeks"),
excluded_locations = NULL,
quantile_tol = 4
)
get_epiweekly_hubverse_table(
quantile_forecasts,
reference_date,
target_name,
quantile_value_col = "quantile_value",
quantile_level_col = "quantile_level",
location_col = "location",
timepoint_col = "target_end_date",
target_end_dates = NULL,
horizons = NULL,
reference_dow = NULL,
week_start = NULL,
excluded_locations = NULL,
quantile_tol = 4
)
get_flusight_hub_table(
quantile_forecasts,
reference_date,
target_name,
quantile_value_col = "quantile_value",
quantile_level_col = "quantile_level",
location_col = "location",
timepoint_col = "target_end_date",
quantile_tol = 4
)
get_covid_hub_table(
quantile_forecasts,
reference_date,
target_name,
quantile_value_col = "quantile_value",
quantile_level_col = "quantile_level",
location_col = "location",
timepoint_col = "target_end_date",
quantile_tol = 4
)
Arguments
- quantile_forecasts
tidy data frame of quantile forecasts to format, which should have a location column, a column of quantile values, a column of quantile levels, and columns indicating the target end date.
- reference_date
reference date for the hub forecast.
- target_name
Name of the target for the table.
- quantile_value_col
name of the column containing the quantile values. Default
'quantile_value'
(the default output column name fromtrajectories_to_quantiles()
).- quantile_level_col
name of the column indicating the quantile level. Default
'quantile_level'
(the default output column name fromtrajectories_to_quantiles()
).- location_col
name of the column containing the location value. Default
'location'
.- timepoint_col
names of the columns indicating the target end date.
- target_end_dates
Vector of target end dates to include,
- horizons
Vector of forecast horizons to include, in
horizon_timescale
s ahead of thereference_date
.- horizon_timescale
Either "days" or "weeks"
- excluded_locations
locations to exclude from the table Default c("60", "78") (American Samoa and the US Virgin Islands, for which FluSight does not currently accept forecasts).
- quantile_tol
Round quantile level values to this many digits
- reference_dow
Which day of the week should the reference_date be, as an integer?
- week_start
Starting day of the week relative to Monday, as an integer. See the
lubridate::wday()
documentation for details.
Value
a properly formatted table, as a tibble
.