Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
sensor_id
stringlengths
1
5
entry_date
timestamp[s]date
2015-01-01 00:00:00
2015-09-30 23:45:00
traffic_intensity
int64
0
91.4k
sensor_occupancy
int64
-1
505
avg_speed
int64
0
4.66k
read_error
stringclasses
3 values
original_traffic_intensity
int64
is_interpolated
stringclasses
2 values
0
2015-01-22T14:30:00
117
3
22
N
null
0
1001
2015-01-01T00:00:00
210
0
0
N
null
0
1001
2015-01-01T00:15:00
216
1
0
N
null
0
1001
2015-01-01T00:30:00
180
0
0
N
null
0
1001
2015-01-01T00:45:00
1,140
3
0
N
null
0
1001
2015-01-01T01:00:00
1,830
6
0
N
null
0
1001
2015-01-01T01:15:00
2,916
9
0
N
null
0
1001
2015-01-01T01:30:00
3,372
11
0
N
null
0
1001
2015-01-01T01:45:00
3,768
13
0
N
null
0
1001
2015-01-01T02:00:00
3,588
10
0
N
null
0
1001
2015-01-01T02:15:00
2,868
9
0
N
null
0
1001
2015-01-01T02:30:00
2,364
9
0
N
null
0
1001
2015-01-01T02:45:00
2,136
7
0
N
null
0
1001
2015-01-01T03:00:00
1,572
6
0
N
null
0
1001
2015-01-01T03:15:00
1,530
6
0
N
null
0
1001
2015-01-01T03:30:00
1,440
4
0
N
null
0
1001
2015-01-01T03:45:00
1,008
4
0
N
null
0
1001
2015-01-01T04:00:00
1,185
3
0
N
null
0
1001
2015-01-01T04:15:00
960
3
0
N
null
0
1001
2015-01-01T04:30:00
552
1
0
N
null
0
1001
2015-01-01T04:45:00
600
1
0
N
null
0
1001
2015-01-01T05:00:00
432
1
0
N
null
0
1001
2015-01-01T05:15:00
372
1
0
N
null
0
1001
2015-01-01T05:30:00
372
1
0
N
null
0
1001
2015-01-01T05:45:00
564
2
0
N
null
0
1001
2015-01-01T06:00:00
555
2
0
N
null
0
1001
2015-01-01T06:15:00
432
1
0
N
null
0
1001
2015-01-01T06:30:00
825
2
0
N
null
0
1001
2015-01-01T06:45:00
860
2
0
N
null
0
1001
2015-01-01T07:00:00
1,065
3
0
N
null
0
1001
2015-01-01T07:15:00
1,068
3
0
N
null
0
1001
2015-01-01T07:30:00
924
3
0
N
null
0
1001
2015-01-01T07:45:00
864
3
0
N
null
0
1001
2015-01-01T08:00:00
1,032
5
0
N
null
0
1001
2015-01-01T08:15:00
888
3
0
N
null
0
1001
2015-01-01T08:30:00
810
2
0
N
null
0
1001
2015-01-01T08:45:00
540
1
0
N
null
0
1001
2015-01-01T09:00:00
504
1
0
N
null
0
1001
2015-01-01T09:15:00
684
2
0
N
null
0
1001
2015-01-01T09:30:00
684
2
0
N
null
0
1001
2015-01-01T09:45:00
510
2
0
N
null
0
1001
2015-01-01T10:00:00
624
2
0
N
null
0
1001
2015-01-01T10:15:00
420
2
0
N
null
0
1001
2015-01-01T10:30:00
525
2
0
N
null
0
1001
2015-01-01T10:45:00
444
1
0
N
null
0
1001
2015-01-01T11:00:00
744
2
0
N
null
0
1001
2015-01-01T11:15:00
660
2
0
N
null
0
1001
2015-01-01T11:30:00
564
2
0
N
null
0
1001
2015-01-01T11:45:00
924
3
0
N
null
0
1001
2015-01-01T12:00:00
1,224
4
0
N
null
0
1001
2015-01-01T12:15:00
1,035
3
0
N
null
0
1001
2015-01-01T12:30:00
1,056
3
0
N
null
0
1001
2015-01-01T12:45:00
1,416
4
0
N
null
0
1001
2015-01-01T13:00:00
1,320
3
0
N
null
0
1001
2015-01-01T13:15:00
1,632
4
0
N
null
0
1001
2015-01-01T13:30:00
2,244
6
0
N
null
0
1001
2015-01-01T13:45:00
2,424
7
0
N
null
0
1001
2015-01-01T14:00:00
2,388
7
0
N
null
0
1001
2015-01-01T14:15:00
2,712
7
0
N
null
0
1001
2015-01-01T14:30:00
2,760
7
0
N
null
0
1001
2015-01-01T14:45:00
3,048
8
0
N
null
0
1001
2015-01-01T15:00:00
2,268
7
0
N
null
0
1001
2015-01-01T15:15:00
1,752
4
0
N
null
0
1001
2015-01-01T15:30:00
1,575
5
0
N
null
0
1001
2015-01-01T15:45:00
1,176
3
0
N
null
0
1001
2015-01-01T16:00:00
1,080
4
0
N
null
0
1001
2015-01-01T16:15:00
1,005
4
0
N
null
0
1001
2015-01-01T16:30:00
1,020
3
0
N
null
0
1001
2015-01-01T16:45:00
1,056
3
0
N
null
0
1001
2015-01-01T17:00:00
1,350
4
0
N
null
0
1001
2015-01-01T17:15:00
1,632
4
0
N
null
0
1001
2015-01-01T17:30:00
1,635
5
0
N
null
0
1001
2015-01-01T17:45:00
2,100
8
0
N
null
0
1001
2015-01-01T18:00:00
2,520
9
0
N
null
0
1001
2015-01-01T18:15:00
2,010
7
0
N
null
0
1001
2015-01-01T18:30:00
3,264
11
0
N
null
0
1001
2015-01-01T18:45:00
3,012
11
0
N
null
0
1001
2015-01-01T19:00:00
3,510
9
0
N
null
0
1001
2015-01-01T19:15:00
3,312
10
0
N
null
0
1001
2015-01-01T19:30:00
3,408
10
0
N
null
0
1001
2015-01-01T19:45:00
3,384
10
0
N
null
0
1001
2015-01-01T20:00:00
3,876
11
0
N
null
0
1001
2015-01-01T20:15:00
3,780
11
0
N
null
0
1001
2015-01-01T20:30:00
2,640
9
0
N
null
0
1001
2015-01-01T20:45:00
2,820
8
0
N
null
0
1001
2015-01-01T21:00:00
2,412
9
0
N
null
0
1001
2015-01-01T21:15:00
1,920
5
0
N
null
0
1001
2015-01-01T21:30:00
2,292
8
0
N
null
0
1001
2015-01-01T21:45:00
1,720
5
0
N
null
0
1001
2015-01-01T22:00:00
2,196
8
0
N
null
0
1001
2015-01-01T22:15:00
1,848
6
0
N
null
0
1001
2015-01-01T22:30:00
1,260
5
0
N
null
0
1001
2015-01-01T22:45:00
1,470
5
0
N
null
0
1001
2015-01-01T23:00:00
1,060
2
0
N
null
0
1001
2015-01-01T23:15:00
980
3
0
N
null
0
1001
2015-01-01T23:30:00
940
2
0
N
null
0
1001
2015-01-01T23:45:00
620
2
0
N
null
0
1001
2015-01-02T00:00:00
675
1
0
N
null
0
1001
2015-01-02T00:15:00
600
2
0
N
null
0
1001
2015-01-02T00:30:00
320
1
0
N
null
0
End of preview. Expand in Data Studio

GO-MO: A large-scale graph-augmented traffic dataset for data-driven spatio-temporal traffic analysis

This is the official dataset repository for the GO-MO traffic dataset.

The GO-MO dataset is a traffic dataset extracted from the publicly available Open Data Portal of the City Council of Madrid (Spain).

GO-MO comprises more than 1.5 billion records of three traffic-related metrics together with spatio-temporal data and metadata, spanning a ten-year period (2015-2024). Additionally, the GO-MO dataset introduces two graph representations extracted from traffic data and metadata: one for routes between nodes and another for the road network.

📊 Statistics

Traffic data:

  • Total number of timestamps: 350,688 between 01/01/2015 00:00:00 and 31/12/2024 23:45:00 at 15 minutes interval.
  • Total number of records: 1,523,167,456
  • Number of measure points (traffic sensors): 5,157
  • Traffic magnitudes: 3 (traffic intensity, average speed, sensor occupancy)
  • Traffic sensors metadata: 6 variables (sensor type, district, road name, number of lanes, maximum speed, maximum capacity) plus UTM and GCS WGS84 location.

Graphs:

  • Route based graph:
    • Graph type: Directed
    • Number of nodes: 5,157
    • Number of edges: 135,428
    • Average degree: 52.522
  • Road network based graph:
    • Graph type: Multidirected graph
    • Number of nodes: 35,304
    • Number of edges: 69,362
    • Average degree: 3,929

📁 File structure and data fields

The GO-MO release contains yearly traffic data files, one sensor metadata file, and two graph files:

GO-MO/
├── traffic_data_2015.csv
├── traffic_data_2016.csv
├── traffic_data_2017.csv
├── traffic_data_2018.csv
├── traffic_data_2019.csv
├── traffic_data_2020.csv
├── traffic_data_2021.csv
├── traffic_data_2022.csv
├── traffic_data_2023.csv
├── traffic_data_2024.csv
├── traffic_sensors.csv
├── routes-graph.pkl
└── road-network-graph.pkl

Yearly traffic files: traffic_data_YYYY.csv

Each yearly file contains the traffic measurements for one calendar year, where YYYY ranges from 2015 to 2024. Each row corresponds to one traffic sensor at one 15-minute timestamp.

Field Type Description
sensor_id string Unique identifier of the traffic sensor. It links each traffic record to the corresponding row in traffic_sensors.csv and to graph nodes.
entry_date timestamp Timestamp of the measurement in Madrid local time, sampled at 15-minute intervals.
traffic_intensity integer Number of vehicles measured during the aggregation interval, expressed as vehicles/hour. Missing or erroneous values may have been interpolated during curation.
sensor_occupancy integer Percentage of time during the aggregation interval in which the sensor was occupied by a vehicle. Missing or erroneous values may have been interpolated during curation.
avg_speed integer Average vehicle speed. This value is only available for sensors for which speed is provided by the source. Missing or erroneous values may have been interpolated during curation.
read_error string Source quality flag. N indicates no error, E indicates that some collected values were suboptimal, and S indicates erroneous values not integrated into the aggregated source results.
original_traffic_intensity integer Original traffic intensity value before the out-of-range correction step. This field is provided to make the correction of implausible traffic intensity values transparent.
is_interpolated string Three-character interpolation flag indicating which of the three traffic variables were interpolated. See the detailed explanation below.

Interpolation flag: is_interpolated

The is_interpolated field is a three-character string flag. The first, second, and third positions correspond to traffic_intensity, sensor_occupancy, and avg_speed, respectively.

A value of 1 indicates that the corresponding value was interpolated during the GO-MO curation process. A value of 0 indicates that the corresponding value is original and unmodified.

is_interpolated Meaning
0 No traffic variable was interpolated.
100 Only traffic_intensity was interpolated.
010 Only sensor_occupancy was interpolated.
001 Only avg_speed was interpolated.
110 traffic_intensity and sensor_occupancy were interpolated.
101 traffic_intensity and avg_speed were interpolated.
011 sensor_occupancy and avg_speed were interpolated.
111 All three traffic variables were interpolated.

Sensor metadata file: traffic_sensors.csv

The file traffic_sensors.csv contains one row per traffic sensor and provides the metadata needed to interpret and spatially locate the measurements.

Field Type Description
id string Unique sensor identifier. This field matches sensor_id in the yearly traffic files.
element_type string Sensor type. URB denotes urban sensors; Non-URB denotes non-urban sensors.
district integer Administrative district of Madrid where the sensor is located.
internal_code string Internal code assigned to the sensor by the source provider.
name string Sensor name or description, usually including the road or location where it is installed.
utm_x float UTM 30N X coordinate of the sensor location.
utm_y float UTM 30N Y coordinate of the sensor location.
longitude float WGS84 longitude of the sensor location.
latitude float WGS84 latitude of the sensor location.
lanes integer Estimated or retrieved number of lanes for the road segment associated with the sensor.
max_speed integer Speed limit of the road segment associated with the sensor.
osm_name string OpenStreetMap road name associated with the sensor location.
max_capacity integer Estimated maximum traffic capacity of the road segment associated with the sensor.

Graph files

GO-MO provides two graph representations of the traffic sensor and road network structure. Both graph files are released as Python NetworkX pickle files.

Security note on pickle files: the graph files are distributed as Python pickle files for compatibility with NetworkX workflows. Pickle files can execute arbitrary code when loaded. Only load routes-graph.pkl and road-network-graph.pkl if they were obtained from this official GO-MO repository or another trusted source.

File Graph Description
routes-graph.pkl Routes Graph (RG) Directed sensor-to-sensor graph. Each node represents a traffic sensor. Edges represent route-based connectivity between nearby sensors, with edge weights derived from shortest-route distances.
road-network-graph.pkl Road Network Graph (RNG) Multi-directed road-network graph. Nodes represent road intersections or road-network points, and edges represent road segments. Some nodes or edges are associated with traffic sensors through the sensor_id attribute.

Relationship between CSV files and graph nodes

The released files are linked through the sensor identifier:

  • In traffic_data_YYYY.csv, the field sensor_id identifies the sensor that produced each traffic record.
  • In traffic_sensors.csv, the field id contains the corresponding sensor metadata.
  • In routes-graph.pkl, each node represents a traffic sensor and includes the corresponding sensor identifier.
  • In road-network-graph.pkl, the road network is represented explicitly; the road-network elements associated with traffic sensors include the corresponding sensor_id attribute.

Therefore, users can join the yearly traffic files with traffic_sensors.csv using:

traffic_data_YYYY.csv.sensor_id = traffic_sensors.csv.id

The same sensor identifiers can be used to relate the tabular data to the graph representations.

Main graph attributes

The exact set of graph attributes may vary depending on the OpenStreetMap information available for each road segment. The main attributes are:

Attribute Graph Description
sensor_id RG/RNG Traffic sensor identifier. In RG, it identifies the sensor represented by each node. In RNG, it identifies road-network elements associated with a traffic sensor.
weight RG Route-based edge weight derived from the shortest-route distance between sensors.
osmid / OSMID RNG OpenStreetMap identifier of the road segment.
length RNG Road-segment length in metres.
geometry RNG Road-segment geometry.
reversed RNG Indicates whether the edge direction is reversed with respect to the original OpenStreetMap way.
highway RNG OpenStreetMap road type.
name RNG OpenStreetMap road name, when available.
oneway RNG Indicates whether the road segment is one-way.
lanes RNG Number of lanes, when available from OpenStreetMap.
maxspeed RNG Speed limit, when available from OpenStreetMap.
bridge, tunnel, junction, access, width, est_width, ref RNG Additional OpenStreetMap road-segment attributes, when available.

🔧 Tools and Code

🐍 Minimal Python loading example

After downloading one or more CSV files, the sensor metadata CSV or the graph pickle files, you can load them with the following code. The example assumes that the files are located in the current working directory.

Security note on pickle files: the graph files are distributed as Python pickle files for compatibility with NetworkX workflows. Pickle files can execute arbitrary code when loaded. Only load routes-graph.pkl and road-network-graph.pkl if they were obtained from this official GO-MO repository or another trusted source.

import pickle
import pandas as pd

# Load one yearly traffic file
traffic_2024 = pd.read_csv(
    "traffic_data_2024.csv",
    parse_dates=["entry_date"],
    dtype={
        "sensor_id": "string",
        "read_error": "string",
        "is_interpolated": "string",
    },
)

# Load sensor metadata
sensors = pd.read_csv(
    "traffic_sensors.csv",
    dtype={
        "id": "string",
        "element_type": "string",
        "internal_code": "string",
        "name": "string",
        "osm_name": "string",
    },
)

# Join traffic records with sensor metadata
traffic_2024_with_metadata = traffic_2024.merge(
    sensors,
    left_on="sensor_id",
    right_on="id",
    how="left",
)

# Load the Routes Graph (RG)
with open("routes-graph.pkl", "rb") as f:
    routes_graph = pickle.load(f)

# Load the Road Network Graph (RNG)
with open("road-network-graph.pkl", "rb") as f:
    road_network_graph = pickle.load(f)

print(traffic_2024.shape)
print(sensors.shape)
print(routes_graph.number_of_nodes(), routes_graph.number_of_edges())
print(road_network_graph.number_of_nodes(), road_network_graph.number_of_edges())

💾 Data sources

The original data published in this dataset is available on the Open Data Portal of the City Council of Madrid (Spain).

📄 License

This Dataset is licensed under the CC-BY 4.0.

You are free to:

  • ✅ Share — copy and redistribute the material in any medium or format for any purpose, even commercially.
  • ✅ Adapt — remix, transform, and build upon the material for any purpose, even commercially.

The full license text is available here.

📚 Citation

GO-MO has its own dataset DOI. If you use the released dataset files, metadata, or graph files, please cite the dataset record:

@dataset{maria_arribas2025gomo,
  author       = {María-Arribas, David and Cuesta-Infante, Alfredo and Pantrigo, Juan J.},
  title        = {{GO-MO: A large-scale graph-augmented traffic dataset for data-driven spatio-temporal traffic analysis}},
  year         = {2025},
  publisher    = {Hugging Face},
  version      = {1.0},
  doi          = {10.57967/hf/7201},
  url          = {https://doi.org/10.57967/hf/7201}
}

If you also refer to the scientific description, methodology, data curation process, graph construction, or validation analyses, please cite the associated article as well. The article citation will be updated here once the final published version is available.

@misc{maria_arribas2026large_scale,
  author       = {María-Arribas, David and Pantrigo, Juan J. and Cuesta-Infante, Alfredo},
  title        = {{A large-scale graph-augmented traffic dataset for data-driven spatio-temporal traffic analysis}},
  year         = {2026},
  note         = {Preprint},
  publisher    = {Research Square},
  doi          = {10.21203/rs.3.rs-8670080/v1},
  url          = {https://doi.org/10.21203/rs.3.rs-8670080/v1}
}
Downloads last month
224