Prophet by Facebook, easy forecasting of timeseries data
Forecasting is a common problem in the publishing industry, most notably during budget season, and Facebook’s Prophet might come in handy next time you face yourself having to predict next year’s traffic.
Prophet is a new open source project than can be used with R or Python to predict some value into the future, breaking out along day of week and months to highlight seasonality.
Only hurdle to snag me was using system Python over
pyenv. Matplotlib needed to be in a “framework” version of Python, a requirement which these virtualized environments didn’t satisfy.
Here’s a simple 3-year project of sessions on this site. As you can see, DavisShaver.com isn’t a particularly high traffic domain, but at least it’s growing!
This prediction data comes from just a few lines of code…
import pandas as pd import numpy as np from fbprophet import Prophet df = pd.read_csv('./test.csv') df['y'] = np.log(df['y']) m = Prophet() m.fit(df); future = m.make_future_dataframe(periods=365) forecast = m.predict(future) m.plot(forecast);
Definitely worth checking out next time you need to predict something!
Did you enjoy this post?
Signup to receive a weekly email containing my new posts, curated links, and book reviews.