CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for Testing 18.04.

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: Testing 18.04
Views: 415
Kernel: Python 3 (system-wide)

Prophet on CoCalc

Forecasting at scale!

https://facebook.github.io/prophet/

import pandas as pd from fbprophet import Prophet
fn = "example_wp_log_peyton_manning.csv"
! wget -q -O $fn https://raw.githubusercontent.com/facebook/prophet/master/examples/example_wp_log_peyton_manning.csv
df = pd.read_csv(fn) df.head()
m = Prophet() m.fit(df)
INFO:fbprophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
<fbprophet.forecaster.Prophet at 0x7f1715940048>
future = m.make_future_dataframe(periods=365) future.tail()
forecast = m.predict(future) forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail()
fig1 = m.plot(forecast)
Image in a Jupyter notebook
fig2 = m.plot_components(forecast)
Image in a Jupyter notebook