diff --git a/R/NAMESPACE b/R/NAMESPACE index 6a5312a..1e460d9 100644 --- a/R/NAMESPACE +++ b/R/NAMESPACE @@ -5,6 +5,7 @@ S3method(predict,prophet) export(add_regressor) export(add_seasonality) export(cross_validation) +export(dyplot.prophet) export(fit.prophet) export(layer_changepoints) export(make_future_dataframe) diff --git a/R/R/plot.R b/R/R/plot.R index 3718869..1264b2b 100644 --- a/R/R/plot.R +++ b/R/R/plot.R @@ -309,7 +309,7 @@ plot_seasonality <- function(m, name, uncertainty = TRUE) { #' @param uncertainty Boolean indicating if the uncertainty interval for yhat #' should be plotted. Must be present in fcst as yhat_lower and yhat_upper. #' @param ... additional arguments -#' @importFrom magrittr "%>%" +#' @importFrom dplyr "%>%" #' @return A dygraph plot. #' #' @examples diff --git a/R/man/df_for_plotting.Rd b/R/man/df_for_plotting.Rd index f8d630d..3bbda91 100644 --- a/R/man/df_for_plotting.Rd +++ b/R/man/df_for_plotting.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{df_for_plotting} \alias{df_for_plotting} \title{Merge history and forecast for plotting.} diff --git a/R/man/dyplot.prophet.Rd b/R/man/dyplot.prophet.Rd new file mode 100644 index 0000000..002a7db --- /dev/null +++ b/R/man/dyplot.prophet.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot.R +\name{dyplot.prophet} +\alias{dyplot.prophet} +\title{Plot the prophet forecast.} +\usage{ +dyplot.prophet(x, fcst, uncertainty = TRUE, ...) +} +\arguments{ +\item{x}{Prophet object.} + +\item{fcst}{Data frame returned by predict(m, df).} + +\item{uncertainty}{Boolean indicating if the uncertainty interval for yhat +should be plotted. Must be present in fcst as yhat_lower and yhat_upper.} + +\item{...}{additional arguments} +} +\value{ +A dygraph plot. +} +\description{ +Plot the prophet forecast. +} +\examples{ +\dontrun{ +history <- data.frame(ds = seq(as.Date('2015-01-01'), as.Date('2016-01-01'), by = 'd'), + y = sin(1:366/200) + rnorm(366)/10) +m <- prophet(history) +future <- make_future_dataframe(m, periods = 365) +forecast <- predict(m, future) +dyplot.prophet(m, forecast) +} + +} diff --git a/R/man/plot.prophet.Rd b/R/man/plot.prophet.Rd index 25c520e..38cd604 100644 --- a/R/man/plot.prophet.Rd +++ b/R/man/plot.prophet.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{plot.prophet} \alias{plot.prophet} \title{Plot the prophet forecast.} diff --git a/R/man/plot_forecast_component.Rd b/R/man/plot_forecast_component.Rd index f85f896..06c1fb1 100644 --- a/R/man/plot_forecast_component.Rd +++ b/R/man/plot_forecast_component.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{plot_forecast_component} \alias{plot_forecast_component} \title{Plot a particular component of the forecast.} diff --git a/R/man/plot_seasonality.Rd b/R/man/plot_seasonality.Rd index a92e8b5..e5f2df4 100644 --- a/R/man/plot_seasonality.Rd +++ b/R/man/plot_seasonality.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{plot_seasonality} \alias{plot_seasonality} \title{Plot a custom seasonal component.} diff --git a/R/man/plot_weekly.Rd b/R/man/plot_weekly.Rd index 6476b56..6092345 100644 --- a/R/man/plot_weekly.Rd +++ b/R/man/plot_weekly.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{plot_weekly} \alias{plot_weekly} \title{Plot the weekly component of the forecast.} diff --git a/R/man/plot_yearly.Rd b/R/man/plot_yearly.Rd index 9a7c534..7a227ed 100644 --- a/R/man/plot_yearly.Rd +++ b/R/man/plot_yearly.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{plot_yearly} \alias{plot_yearly} \title{Plot the yearly component of the forecast.} diff --git a/R/man/prophet_plot_components.Rd b/R/man/prophet_plot_components.Rd index eeeea29..4bf0f13 100644 --- a/R/man/prophet_plot_components.Rd +++ b/R/man/prophet_plot_components.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{prophet_plot_components} \alias{prophet_plot_components} \title{Plot the components of a prophet forecast. diff --git a/R/man/seasonality_plot_df.Rd b/R/man/seasonality_plot_df.Rd index 12d2da9..11def86 100644 --- a/R/man/seasonality_plot_df.Rd +++ b/R/man/seasonality_plot_df.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/prophet.R +% Please edit documentation in R/plot.R \name{seasonality_plot_df} \alias{seasonality_plot_df} \title{Prepare dataframe for plotting seasonal components.}