Source file
Climate Data Aggregation
How we aggregate 10 years of daily ERA5 reanalysis data into monthly climate averages for countries and cities.
Methodology brief
What this file explains
This source file shows how Climate Data Aggregation data moves from public release to published WorldStats pages: collection, validation, transformation, coverage limits, and known caveats.
- 01 Source
- 02 Ingest
- 03 Validate
- 04 Publish
Overview
Climate data on WorldStats comes from Open-Meteo's Archive API, which provides ERA5 reanalysis data from the European Centre for Medium-Range Weather Forecasts (ECMWF). ERA5 is a comprehensive global climate dataset combining satellite observations, weather station data, and atmospheric modeling.
Aggregation Method
We fetch 10 years of daily weather data (2016–2025) for each location's capital city coordinates. Daily values are aggregated into monthly averages: temperatures are averaged, rainfall is summed and divided by years, sunshine hours are converted from seconds, and rainy days count days with precipitation > 1mm. Wind direction uses circular mean (atan2 of sin/cos components) to correctly average angular data.
Variables Collected
For each month we compute: average high temperature, average low temperature, feels-like high/low (apparent temperature), total rainfall (mm), rainy days count, sunshine hours, relative humidity (%), maximum wind speed (km/h), maximum gust speed (km/h), and dominant wind direction (degrees). UV index is backfilled separately from recent Open-Meteo forecast UV data where available. Sea surface temperature is fetched separately from Open-Meteo's Marine API for coastal locations.
Known Limitations
ERA5 reanalysis data has a spatial resolution of approximately 31km, so mountain and coastal microclimates may not be precisely captured. Climate data represents the capital city's coordinates, which may not reflect conditions in other parts of a large country. The 10-year averaging period (2016–2025) may not fully represent long-term climate trends.