View source: R/get_plot_forecast_data.R
get_plot_forecast_data | R Documentation |
load_truth()
and pivot_forecasts_wider()
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 = NULL,
plot_truth = TRUE,
truth_source,
target_variable_to_plot,
truth_as_of = NULL,
hub = c("US", "ECDC", "FluSight")
)
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 |
a vector of strings of fips code or CBSA codes or location names,
such as "Hampshire County, MA", "Alabama", "United Kingdom".
A US county location names must include state abbreviation.
Default to |
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
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.