plot_forecast_counts {scoringutils} | R Documentation |
Visualise the number of available forecasts
Description
Visualise Where Forecasts Are Available.
Usage
plot_forecast_counts(
forecast_counts,
x,
y = "model",
x_as_factor = TRUE,
show_counts = TRUE
)
Arguments
forecast_counts |
A data.table (or similar) with a column |
x |
Character vector of length one that denotes the name of the column to appear on the x-axis of the plot. |
y |
Character vector of length one that denotes the name of the column to appear on the y-axis of the plot. Default is "model". |
x_as_factor |
Logical (default is |
show_counts |
Logical (default is |
Value
A ggplot object with a plot of forecast counts
Examples
library(ggplot2)
library(magrittr) # pipe operator
forecast_counts <- example_quantile %>%
as_forecast_quantile %>%
get_forecast_counts(by = c("model", "target_type", "target_end_date"))
plot_forecast_counts(
forecast_counts, x = "target_end_date", show_counts = FALSE
) +
facet_wrap("target_type")
[Package scoringutils version 2.0.0 Index]