Auto Time Series Forecasting With Prophet and Streamlit

Hey folks, thanks to some of the posts on the forum I was able to cobble together a small MVP version of a Streamlit data app.

The app works by letting the user input their own time series data from a CSV file. It then applies the Prophet time series forecasting model on the data (for a user specified period interval), and then shows various trends and features of the data set. Finally, the user can then download the newly created forecast back to their desktop!

You can check it out live on heroku here: https://autoforecast-prophet.herokuapp.com/
(assuming my 25 hrs a month have not run out).

The code is also available here: https://github.com/zachrenwick/streamlit_forecasting_app

Feel free to connect with me on Twitter for any insights into how I put it together. I’m also totally open to improvements - I didn’t use caching so I’m sure some performance gains could be found!

Some things I was working on adding:

  • view the forecast performance metrics (I had it in there previously, but it was too slow to run on Heroku’s free tier server)
4 Likes

Looks good! As a suggestion for people who want to try it out, you could put a small example file of the right format encoded for download on the page. Or a checkbox for “load example file” where you hide the upload field.

Another feature tweak would be to read the csv file and create two selectboxes with column names, one for ds and one for y to allow users to upload a file exported from something else without changing it.

Great to see these kinds of things appearing :slight_smile:

2 Likes

Great job @zachrenwick, thanks for sharing the app and the code! I agree with @Ian_Calvert, an example file would be great to see the format (though, I do see your GitHub has a PNG, so maybe even showing that is enough).

It’d be interesting to see how much caching would help…I wouldn’t expect too much in this case other than caching the dataset, but even that wouldn’t matter until the data volumes got pretty large.

1 Like