load_truth()
and pivot_forecasts_wider()
get_plot_forecast_data.Rd
Combine load_truth()
and pivot_forecasts_wider()
get_plot_forecast_data( forecast_data, truth_data = NULL, models_to_plot, forecast_dates_to_plot, horizons_to_plot, quantiles_to_plot, locations_to_plot, plot_truth = TRUE, truth_source, target_variable_to_plot, truth_as_of = NULL, hub = c("US", "ECDC") )
forecast_data | required data.frame with forecasts in the format returned
by |
---|---|
truth_data | optional data.frame from one truth source in the format returned
by |
models_to_plot | characters of model abbreviations |
forecast_dates_to_plot | date string vectors for forecast dates to plot.
Default to all forecast dates available in |
horizons_to_plot | forecasts are plotted for the horizon time steps after the forecast date. |
quantiles_to_plot | vector of quantiles to include in the plot |
locations_to_plot | optional character vector of location fips codes.
Default to all locations available in |
plot_truth | logical to indicate whether truth data should be plotted.
Default to |
truth_source | character specifying where the truth data will
be loaded from if truth_data is not provided. Currently support |
target_variable_to_plot | string specifying target type. It should be one of
|
truth_as_of | the plot includes the truth data that would have been
in real time as of the |
hub | character, which hub to use. Default is |
data.frame with columns model
,
forecast_date
, location
, target_variable
, type
, quantile
, value
,
horizon
and target_end_date
.