Could prophet algorithms from Facebook forecast global temperature tendency?

Jorge Robinat
Analytics Vidhya
Published in
3 min readFeb 24, 2020

--

We don´t know, but we try. First, we prepare a database with several temperature airports. I sample ten international airports and record only the parameter temperature. To do so, I read from the IOWA State University, the data I needed (link). You need to know the airport ICAO name. This link will help you to find the ICAO name of all airports in the world.

The list of selected airports and its ICAO name are: London Heathrow Airport (EGLL), John F. Kennedy International Airport (KJFK), Adolfo Suárez Madrid-Barajas (LEMD), Sheremetyevo Alexander S. Pushkin International Airport (UUEE), Cape Town International Airport (FACT), Narita International Airport (RJAA), Ministro Pistarini International Airport (SAEZ), Luis Muñoz Marin International Airport (TJSJ), Indira Gandhi International Airport (VIDP), Sydney Kingsford Smith International Airport (YSSY)

We read CSV files with two columns: date-time column and temperature in degrees Celsius. Perhaps, some temperatures are outliers or mistakes. One way to avoid mistakes is by calculating the daily median temperature and not the average temperature. Then we plot some results:

The daily median temperature at London Heathrow Airport
The daily median temperature at Buenos Aires Airport
The daily median temperature at San Juan Airport

Three airports present a clear seasonable pattern. We can decompose the time series in the trend and yearly seasonality (assuming no weekly component). Airports in the southern hemisphere reach the high-temperature value in January or February. Airports in the northern hemisphere get the high-temperature value in July or August. The far we are from the equator, the temperature amplitude increases.

We can apply the Prophet algorithm to find the trend and seasonality component of each airport. At London Heathrow Airport, we plot in black dots the observed data, and the blue line is the predicted temperature. Red lines show a trend.

We can see a clear tendency in this case. Others airports exhibit a negative tendency like KJFK

There are airports where it is challenging to guest a clear tendency like San Juan airport (TJSJ). San Juan Airport es near the equator (18.5 N latitude) and the sea. Temperature oscillation depends on latitude and distance from the sea.

We can define global as the average of the daily median temperature obtained in ten selected airports. The graphic results are:

No substantial trend can be shown in the figure. Conclusion: The prophet algorithm by Facebook can´t show a clear global temperature tendency. You can follow the code in the notebook: airport temperature posted by me in Kaggle.

Thank you for your attention.

--

--