Skip to contents

Expects quantile forecast output in hubverse format (e.g. as created by get_hubverse_table()) and an observed data table with location, date, and value columns. The column names in the observed data table can be configured; defaults are "location", "date", and "value", respectively (i.e. direct correspondence with standard hub target data tables).

Usage

quantile_table_to_scorable(
  hubverse_quantile_table,
  observation_table,
  obs_value_column = "value",
  obs_location_column = "location",
  obs_date_column = "date",
  quantile_tol = 10
)

Arguments

hubverse_quantile_table

quantile forecasts, as a hubverse-format tibble, e.g. as produced by get_hubverse_table(), with columns including location, target_end_date, output_type, output_type_id, and value.

observation_table

observations, as a tibble.

obs_value_column

Name of the column containing observed values in the observed table, as a string. Default "value"

obs_location_column

Name of the column containing location values in the observed table, as a string. Default "location"

obs_date_column

Name of the column containing date values in the observed table, as a string. Default "date"

quantile_tol

Round quantile level values to this many decimal places, to avoid problems with floating point number equality comparisons. Passed as the digits argument to base::round(). Default 10.

Value

A data.table for scoring, as the output of scoringutils::as_forecast_quantile().