# METRAQ: Madrid Hourly Air Quality, Meteorology and Traffic Dataset (2001-2024)

## Facts

- Provider: David María-Arribas, Alejandra Abalo-García, Antonio S. Montemayor, Juan J. Pantrigo, Alfredo Cuesta-Infante (Universidad Rey Juan Carlos)
- License: MIT (https://huggingface.co/datasets/dmariaa70/METRAQ-Air-Quality)
- Size: 27 files
- Format: CSV (in sampled files)
- Stored at: Hugging Face, https://huggingface.co/datasets/dmariaa70/METRAQ-Air-Quality
- Access: public, readable without an account
- DOI: https://doi.org/10.57967/hf/5519
- Category: Environmental Science
- Source: https://github.com/dmariaa/metraq-aq
- Page: https://scigantic.com/archive/b5fd4922-aa23-5075-a122-c0f7b4b94775
- Keywords: Environmental Science, CSV, Hugging Face

## About

METRAQ is an hourly air-quality dataset for the city of Madrid, Spain, built from the Madrid City Council open data portal and aligned with meteorology and road traffic for forecasting and spatio-temporal imputation of pollutant concentrations. It holds measurements of up to 14 pollutants (including NO2, NO, NOx, O3, PM10, PM2.5, CO, SO2 and benzene) from the municipal monitoring network, with up to seven meteorological parameters since 2019 and three traffic metrics since 2015, interpolated to the monitoring stations with five methods. The enriched subset has 64,881,744 records over 210,384 hourly timestamps: 25.5 million air-quality, 8.8 million meteorological and 30.5 million traffic rows. Files are 24 yearly CSVs (metraq_aq-2001.csv to 2024, about 6 GB). The authors provide baseline forecasting and imputation models in the companion repository github.com/dmariaa/metraq-aq. Read with pandas. Released under the MIT License by David María Arribas (card and LICENSE file); cite María-Arribas et al. 2025 (doi:10.57967/hf/5519).

## Load the data

```python
import pandas as pd
df = pd.read_csv("hf://datasets/dmariaa70/METRAQ-Air-Quality/metraq_aq-2001.csv")
df.head()
```

## Data structure

File types in sampled files: CSV

Example file: `metraq_aq-2001.csv`

## Open it

- In a hosted notebook with the data mounted: https://scigantic.com/archive/b5fd4922-aa23-5075-a122-c0f7b4b94775
- Full record as JSON (schema card included): https://api.scigantic.com/api/archives/b5fd4922-aa23-5075-a122-c0f7b4b94775
- Over MCP: `get_schema_card` with id `b5fd4922-aa23-5075-a122-c0f7b4b94775` at https://api.scigantic.com/mcp

## Related topics

- [CSV datasets](https://scigantic.com/topics/csv)
- [Environmental Science datasets](https://scigantic.com/topics/environmental-science)
