News

This weather bot helps put today’s temperature into context

A Twitter bot tells people how their city’s weather compares with previous years.
A Twitter bot tells people how their city’s weather compares with previous years. A Twitter bot tells people how their city’s weather compares with previous years.

Is winter going on too long? Is it normally this cold in April?

A weather bot on Twitter can help you learn more about today’s weather while also giving you a bit of context.

Ask it the weather for more than 20 cities – including London – and it will reply with a daily temperature – and set that in context of historical weather data.

The bot has been set up by 32-year-old Nicolas Kayser-Bril, a journalist who specialises in data-driven reporting.

He set up the bot “to be reminded of the normality or abnormality of the current weather”.

“With the climate changing fast, it’s hard to remember what a ‘normal’ temperature is,” he told Press Association.

Kayser-Bril, who was born in Paris but emigrated to Berlin in 2009, initially set up the account to check the conditions in cities he might travel to.

At midday, it tweets the temperature for Berlin with the historical context to boot.

Data for other cities is available by asking the bot a question with a city’s name.

The bot works on open-source Python code which is available on GitHub.

The current data is from OpenWeatherMap and the historical data is from ECMWF‘s ERA-Interim database.

That means there are limitations to the bot, says Kayser-Bril.

“ECMWF does not provide weather station data but aggregates made of weather station data, as well as satellite observations, weather balloons etc.”

That means it doesn’t take into account things like micro-climates and the heat island effect – which causes cities to be warmer due to their surroundings.

“There are many ways the bot could be improved; I’m happy if anyone wants to help,” he added.