View source: R/nixtla_client_plot.R
nixtla_client_plot | R Documentation |
Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation.
nixtla_client_plot(
df,
fcst = NULL,
h = NULL,
id_col = "unique_id",
time_col = "ds",
target_col = "y",
unique_ids = NULL,
max_insample_length = NULL,
plot_anomalies = FALSE
)
df |
A tsibble or a data frame with time series data (insample values). |
fcst |
A tsibble or a data frame with the 'TimeGPT' point forecast and the prediction intervals (if available). |
h |
Forecast horizon. |
id_col |
Column that identifies each series. |
time_col |
Column that identifies each timestep. |
target_col |
Column that contains the target variable. |
unique_ids |
Time series to plot. If NULL (default), selection will be random. |
max_insample_length |
Max number of insample observations to be plotted. |
plot_anomalies |
Whether or not to plot anomalies. |
Plot with historical data and 'TimeGPT”s output (if available).
## Not run:
nixtlar::nixtla_set_api_key("YOUR_API_KEY")
df <- nixtlar::electricity
fcst <- nixtlar::nixtla_client_forecast(df, h=8, id_col="unique_id", level=c(80,95))
nixtlar::timegpt_plot(df, fcst, h=8, id_col="unique_id")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.