plot_forecast | R Documentation |
This function serves as a plotting mechanism for prepped forecast submission data (see format_for_submission). Using truth data supplied, the plots show the historical trajectory of each outcome along with the point estimates for forecasts. Optionally, the user can include 50% prediction interval as well. Plots include trajectories of incident cases, incident deaths, and cumulative deaths faceted by location.
plot_forecast( .data, submission, target = c("Incident Cases", "Incident Deaths", "Cumulative Deaths"), location = "US", pi = TRUE )
.data |
Historical truth data for all locations and outcomes in submission targets |
submission |
Formatted submission |
target |
Vector specifying target(s) to plot; default is |
location |
Vector specifying locations to filter to; |
pi |
Logical as to whether or not the plot should include 50% prediction interval; default is |
A ggplot2
plot object with line plots for outcome trajectories faceted by location
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.