Data in Brief (Dec 2024)

Enriched traffic datasets for the city of Madrid: Integrating data from traffic sensors, the road infrastructure, calendar data and weather data

  • Iván Gómez,
  • Sergio Ilarri

Journal volume & issue
Vol. 57
p. 110878

Abstract

Read online

The proliferation of urban areas and the concurrent increase in vehicular mobility have escalated the urgency for advanced traffic management solutions. This data article introduces two traffic datasets from Madrid, collected between June 2022 and February 2024, to address the challenges of traffic management in urban areas. The first dataset provides detailed traffic flow measurements (vehicles per hour) from urban sensors and road networks, enriched with weather data, calendar data and road infrastructure details from OpenStreetMap. This combination allows for an in-depth analysis of urban mobility. Through preprocessing, data quality is ensured by eliminating inconsistent sensor readings. The second dataset is enhanced for advanced predictive modelling. It includes time-based transformations and a tailored preprocessing pipeline that standardizes numeric data, applies one-hot encoding to categorical features, and uses ordinal encoding for specific features. In constructing the datasets, we initially employed the k-means algorithm to cluster data from multiple sensors, thereby highlighting the most representative ones. This clustering can be adapted or modified according to the user's needs, ensuring flexibility for various analyses and applications.This work underscores the importance of advanced datasets in urban planning and highlights the versatility of these resources for multiple practical applications. We highlight the relevance of the collected data for a variety of essential purposes, including traffic prediction, infrastructure planning, studies on the environmental impact of traffic, event planning, and conducting simulations. These datasets not only provide a solid foundation for academic research but also for designing and implementing more effective and sustainable traffic policies. Furthermore, all related datasets, source code, and documentation have been made publicly available, encouraging further research and practical applications in traffic management and urban planning.

Keywords