Exploratory Time Series Analysis and Prediction with Facebook’s Prophet

Wyatt Sharber, PhD
7 min readDec 20, 2019

I love that I’m getting to the point in my data science bootcamp at Flatiron that I now have enough data science tools in my repertoire that I can start hacking away at some research questions and project ideas I’ve had for a while! As a researcher, it’s easy to come up with hypotheses that I want to test, but knowing how to do so and which methods are appropriate is always the hard part. The time my bootcamp has spent on statistics and model evaluation have really helped me to understand the use-cases and limitations of various analyses, as well as given me the confidence to explore new methods and learn how to use them on my own!

One project idea that has been floating around in my head for over a year involves a change in legislation around liquor laws in my home state and how the change may have affected alcohol-related crimes, such as DUIs and public intoxication. This idea led me to start exploring time series data and whether or not you can find significant changes in trends after a certain time point. Based on intuition alone, I thought of a couple ways to approach this problem: (1) use regression style analyses to model the time series before and after the change point and test if the regression coefficients are different or (2) use a predictive model to forecast into the “future” after the change point and see if the actual data line up with the forecast. In this blog post, I’m going to explore the second idea using some data from the Seattle Crime Database and a time series…

--

--

Wyatt Sharber, PhD

Data scientist and plant evolutionary biologist. Seattle, WA, USA.