Forecasting City Temperature Using Meta’s Prophet

Deep Gan Team
3 min readJul 29, 2022

--

Mike Wang, John Inacay, Wiley Wang (All authors contributed equally)

In this blog post, we explore the time series forecasting tool Prophet by Meta. The Prophet model is often used in predicting commercial trends and cyclical patterns, such as sales and user engagement. We used it for a simple case of predicting the temperature of cities over time. Global warming is an issue that is occurring on Earth characterized by temperatures rising over time. Here we used Prophet to separate the long term trend and cyclical components of the data.

The Prophet model can predict trends, including automatic detection of trend changepoints. In the commercial world and natural world, data follows seasonality cycles, with human behaviors also following holidays and special occasions. The Prophet model can extract these cyclical features out of the data, adapting to both underlying trends as well as the repeatable part of data. The Prophet model works by fitting a model to the data and separating this data into typically 3 individual components that are summed together.

Process and Results

For dataset selection and problem solving, to emphasize the model’s ability in adaptation of time series, we used the Kaggle dataset from Climate Change: Earth Surface Temperature Data. This data includes temperature data over time for various cities.

The Prophet model is fairly straightforward to use. Since our temperature is already daily time series data. We simply add them into the input.

For the results below, we can see that temperatures in the following cities have consistently increased from around the 1850s.

Figure 1: Trend and yearly components for New Delhi, India
Figure 2: Trend and yearly components for Cape Town, South Africa

Conclusions

When working with Prophet, it’s best to think of it as a good tool that does one thing well, like a screwdriver instead of a multitool. If you have time series data that has seasonal or other periodic correlations, you can obtain useful projections of future data points. Sales data seems like it could fit well. Nature data such as the demonstrated temperature model seems to be a good use case, too. These extrapolations can then be used for cases of planning and debate for decision makers without the need for a dedicated data scientist to create specialized models from scratch. However, we think Prophet won’t work well with data that has no correlation to time or if you’re trying to perform more complicated analysis with multi-dimensional data.

Links

--

--

Deep Gan Team

We’re a team of Machine Learning Engineers exploring and researching deep learning technologies