Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot individual components of holidays #60

Closed
wjhrdy opened this issue Mar 1, 2017 · 3 comments
Closed

plot individual components of holidays #60

wjhrdy opened this issue Mar 1, 2017 · 3 comments

Comments

@wjhrdy
Copy link

wjhrdy commented Mar 1, 2017

Having holidays as an aggregate view in prophet_plot_components is concise but there should maybe be an option to view holiday components individually.

Here is some code that if put in the prophet_plot_components function would separate out the holiday components.

df.s <- cbind(ds = df$ds, df[, holiday.comps])
df.s_tidy <- tidyr::gather_(df.s,key_col = "holiday", value = "effect", gather_cols = holiday.comps)
gg.holidays <- ggplot2::ggplot(df.s_tidy, ggplot2::aes(x = ds, 
                                                   y = effect)) + 
                          ggplot2::geom_line(color = forecast.color, na.rm = TRUE) + 
                          ggplot2::facet_wrap(~ holiday, ncol = 1)
@seanjtaylor
Copy link
Contributor

This is a nice idea. We'll consider adding it as an enhancement for the 0.2 release.

@bletham
Copy link
Contributor

bletham commented Jul 29, 2017

8f1607c adds a method plot_forecast_component which can be used to plot any individual holiday by name. I'm inclined to leave it at this for plotting individual holidays, since including them on the components plot would make that plot very long for more than a couple holidays. This hasn't made it to the R yet but will in #101.

@bletham bletham removed the R label Jul 29, 2017
@bletham
Copy link
Contributor

bletham commented Sep 12, 2017

The plot_forecast_component is now available in v0.2 on CRAN and pypi. It's described in the documentation here:
https://facebookincubator.github.io/prophet/docs/seasonality_and_holiday_effects.html

or of course in the docstring for the function.

@bletham bletham closed this as completed Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants