The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'id;"fecha";"tipo_elem";"intensidad";"ocupacion";"carga";"vmed";"error";periodo_integracion'}) and 1 missing columns ({'id;"fecha";"tipo_elem";"intensidad";"ocupacion";"carga";"vmed";"error";"periodo_integracion"'}).
This happened while the csv dataset builder was generating data using
hf://datasets/Oscar3422/Madrid_Traffic/test/09-2026.csv (at revision de9dc72c0abc3aeba10c8db418abdf24e5968137), ['hf://datasets/Oscar3422/Madrid_Traffic@de9dc72c0abc3aeba10c8db418abdf24e5968137/test/09-2026.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1856, in _prepare_split_single
writer.write_table(table)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 811, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 822, in _write_table
pa_table = table_cast(pa_table, self._schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
id;"fecha";"tipo_elem";"intensidad";"ocupacion";"carga";"vmed";"error";periodo_integracion: string
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 589
to
{'id;"fecha";"tipo_elem";"intensidad";"ocupacion";"carga";"vmed";"error";"periodo_integracion"': Value('string')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1379, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 956, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
...<4 lines>...
)
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'id;"fecha";"tipo_elem";"intensidad";"ocupacion";"carga";"vmed";"error";periodo_integracion'}) and 1 missing columns ({'id;"fecha";"tipo_elem";"intensidad";"ocupacion";"carga";"vmed";"error";"periodo_integracion"'}).
This happened while the csv dataset builder was generating data using
hf://datasets/Oscar3422/Madrid_Traffic/test/09-2026.csv (at revision de9dc72c0abc3aeba10c8db418abdf24e5968137), ['hf://datasets/Oscar3422/Madrid_Traffic@de9dc72c0abc3aeba10c8db418abdf24e5968137/test/09-2026.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
id;"fecha";"tipo_elem";"intensidad";"ocupacion";"carga";"vmed";"error";"periodo_integracion" string |
|---|
1001;"2022-01-01 00:00:00";"M30";"408";"1";"0";"61";"N";5 |
1001;"2022-01-01 00:15:00";"M30";"156";"0";"0";"69";"N";5 |
1001;"2022-01-01 00:30:00";"M30";"192";"NaN";"0";"76";"N";5 |
1001;"2022-01-01 00:45:00";"M30";"600";"2";"0";"67";"N";5 |
1001;"2022-01-01 01:00:00";"M30";"1065";"2";"0";"65";"N";4 |
1001;"2022-01-01 01:15:00";"M30";"1704";"5";"0";"66";"N";5 |
1001;"2022-01-01 01:30:00";"M30";"1956";"6";"0";"66";"N";5 |
1001;"2022-01-01 01:45:00";"M30";"1884";"7";"0";"65";"N";5 |
1001;"2022-01-01 02:00:00";"M30";"2208";"8";"0";"63";"N";5 |
1001;"2022-01-01 02:15:00";"M30";"1968";"7";"0";"57";"N";5 |
1001;"2022-01-01 02:30:00";"M30";"1380";"5";"0";"65";"N";5 |
1001;"2022-01-01 02:45:00";"M30";"900";"3";"0";"67";"N";5 |
1001;"2022-01-01 03:00:00";"M30";"816";"1";"0";"82";"N";5 |
1001;"2022-01-01 03:15:00";"M30";"588";"1";"0";"62";"N";5 |
1001;"2022-01-01 03:30:00";"M30";"720";"3";"0";"59";"N";5 |
1001;"2022-01-01 03:45:00";"M30";"252";"0";"0";"60";"N";5 |
1001;"2022-01-01 04:00:00";"M30";"420";"1";"0";"68";"N";5 |
1001;"2022-01-01 04:15:00";"M30";"468";"2";"0";"65";"N";5 |
1001;"2022-01-01 04:30:00";"M30";"180";"0";"0";"63";"N";5 |
1001;"2022-01-01 04:45:00";"M30";"216";"0";"0";"66";"N";5 |
1001;"2022-01-01 05:00:00";"M30";"312";"1";"0";"62";"N";5 |
1001;"2022-01-01 05:15:00";"M30";"216";"1";"0";"75";"N";5 |
1001;"2022-01-01 05:30:00";"M30";"132";"0";"0";"80";"N";5 |
1001;"2022-01-01 05:45:00";"M30";"300";"1";"0";"75";"N";4 |
1001;"2022-01-01 06:00:00";"M30";"120";"NaN";"0";"73";"N";5 |
1001;"2022-01-01 06:15:00";"M30";"312";"1";"0";"72";"N";5 |
1001;"2022-01-01 06:30:00";"M30";"396";"1";"0";"59";"N";5 |
1001;"2022-01-01 06:45:00";"M30";"648";"1";"0";"64";"N";5 |
1001;"2022-01-01 07:00:00";"M30";"876";"3";"0";"73";"N";5 |
1001;"2022-01-01 07:15:00";"M30";"492";"1";"0";"73";"N";5 |
1001;"2022-01-01 07:30:00";"M30";"588";"1";"0";"64";"N";5 |
1001;"2022-01-01 07:45:00";"M30";"684";"2";"0";"69";"N";5 |
1001;"2022-01-01 08:00:00";"M30";"804";"2";"0";"70";"N";5 |
1001;"2022-01-01 08:15:00";"M30";"348";"1";"0";"71";"N";5 |
1001;"2022-01-01 08:30:00";"M30";"348";"1";"0";"61";"N";5 |
1001;"2022-01-01 08:45:00";"M30";"312";"1";"0";"66";"N";5 |
1001;"2022-01-01 09:00:00";"M30";"372";"1";"0";"62";"N";5 |
1001;"2022-01-01 09:15:00";"M30";"480";"1";"0";"68";"N";4 |
1001;"2022-01-01 09:30:00";"M30";"360";"1";"0";"72";"N";5 |
1001;"2022-01-01 09:45:00";"M30";"396";"1";"0";"70";"N";5 |
1001;"2022-01-01 10:00:00";"M30";"360";"1";"0";"64";"N";5 |
1001;"2022-01-01 10:15:00";"M30";"372";"1";"0";"66";"N";5 |
1001;"2022-01-01 10:30:00";"M30";"696";"2";"0";"63";"N";5 |
1001;"2022-01-01 10:45:00";"M30";"660";"3";"0";"66";"N";5 |
1001;"2022-01-01 11:00:00";"M30";"588";"1";"0";"60";"N";5 |
1001;"2022-01-01 11:15:00";"M30";"540";"1";"0";"62";"N";5 |
1001;"2022-01-01 11:30:00";"M30";"852";"2";"0";"64";"N";5 |
1001;"2022-01-01 11:45:00";"M30";"864";"2";"0";"60";"N";5 |
1001;"2022-01-01 12:00:00";"M30";"756";"2";"0";"53";"N";5 |
1001;"2022-01-01 12:15:00";"M30";"984";"3";"0";"58";"N";5 |
1001;"2022-01-01 12:30:00";"M30";"768";"2";"0";"60";"N";5 |
1001;"2022-01-01 12:45:00";"M30";"624";"2";"0";"59";"N";5 |
1001;"2022-01-01 13:00:00";"M30";"1140";"2";"0";"59";"N";5 |
1001;"2022-01-01 13:15:00";"M30";"1692";"4";"0";"61";"N";5 |
1001;"2022-01-01 13:30:00";"M30";"1644";"5";"0";"61";"N";5 |
1001;"2022-01-01 13:45:00";"M30";"2400";"10";"0";"55";"N";5 |
1001;"2022-01-01 14:00:00";"M30";"1872";"5";"0";"61";"N";5 |
1001;"2022-01-01 14:15:00";"M30";"1140";"3";"0";"58";"N";5 |
1001;"2022-01-01 14:30:00";"M30";"1620";"5";"0";"61";"N";5 |
1001;"2022-01-01 14:45:00";"M30";"2028";"6";"0";"62";"N";5 |
1001;"2022-01-01 15:00:00";"M30";"1716";"5";"0";"63";"N";5 |
1001;"2022-01-01 15:15:00";"M30";"1320";"3";"0";"66";"N";5 |
1001;"2022-01-01 15:30:00";"M30";"1104";"3";"0";"59";"N";5 |
1001;"2022-01-01 15:45:00";"M30";"744";"2";"0";"59";"N";5 |
1001;"2022-01-01 16:00:00";"M30";"540";"2";"0";"58";"N";5 |
1001;"2022-01-01 16:15:00";"M30";"900";"2";"0";"54";"N";5 |
1001;"2022-01-01 16:30:00";"M30";"1008";"3";"0";"60";"N";5 |
1001;"2022-01-01 16:45:00";"M30";"1008";"2";"0";"56";"N";5 |
1001;"2022-01-01 17:00:00";"M30";"1344";"3";"0";"60";"N";5 |
1001;"2022-01-01 17:15:00";"M30";"1104";"3";"0";"56";"N";5 |
1001;"2022-01-01 17:30:00";"M30";"1308";"3";"0";"61";"N";5 |
1001;"2022-01-01 17:45:00";"M30";"1668";"4";"0";"63";"N";5 |
1001;"2022-01-01 18:00:00";"M30";"1920";"5";"0";"63";"N";5 |
1001;"2022-01-01 18:15:00";"M30";"1824";"6";"0";"58";"N";5 |
1001;"2022-01-01 18:30:00";"M30";"1908";"6";"0";"59";"N";5 |
1001;"2022-01-01 18:45:00";"M30";"2100";"7";"0";"60";"N";5 |
1001;"2022-01-01 19:00:00";"M30";"2244";"8";"0";"58";"N";5 |
1001;"2022-01-01 19:15:00";"M30";"2064";"8";"0";"51";"N";5 |
1001;"2022-01-01 19:30:00";"M30";"2148";"8";"0";"54";"N";5 |
1001;"2022-01-01 19:45:00";"M30";"1932";"5";"0";"55";"N";5 |
1001;"2022-01-01 20:00:00";"M30";"2016";"6";"0";"57";"N";5 |
1001;"2022-01-01 20:15:00";"M30";"1836";"5";"0";"57";"N";5 |
1001;"2022-01-01 20:30:00";"M30";"1512";"6";"0";"56";"N";5 |
1001;"2022-01-01 20:45:00";"M30";"1656";"6";"0";"64";"N";5 |
1001;"2022-01-01 21:00:00";"M30";"1425";"4";"0";"60";"N";4 |
1001;"2022-01-01 21:15:00";"M30";"1656";"4";"0";"61";"N";5 |
1001;"2022-01-01 21:30:00";"M30";"1620";"5";"0";"60";"N";5 |
1001;"2022-01-01 21:45:00";"M30";"930";"2";"0";"60";"N";4 |
1001;"2022-01-01 22:00:00";"M30";"1104";"2";"0";"59";"N";5 |
1001;"2022-01-01 22:15:00";"M30";"840";"3";"0";"59";"N";5 |
1001;"2022-01-01 22:30:00";"M30";"756";"2";"0";"58";"N";5 |
1001;"2022-01-01 22:45:00";"M30";"960";"2";"0";"63";"N";5 |
1001;"2022-01-01 23:00:00";"M30";"768";"3";"0";"61";"N";5 |
1001;"2022-01-01 23:15:00";"M30";"720";"2";"0";"68";"N";5 |
1001;"2022-01-01 23:30:00";"M30";"444";"1";"0";"66";"N";5 |
1001;"2022-01-01 23:45:00";"M30";"612";"1";"0";"65";"N";5 |
1001;"2022-01-02 00:00:00";"M30";"564";"1";"0";"60";"N";5 |
1001;"2022-01-02 00:15:00";"M30";"324";"1";"0";"62";"N";5 |
1001;"2022-01-02 00:30:00";"M30";"372";"0";"0";"63";"N";5 |
1001;"2022-01-02 00:45:00";"M30";"576";"2";"0";"62";"N";5 |
Madrid Traffic Load Forecasting
A processed version of Madrid City Council’s historical traffic measurements for forecasting traffic load (carga) at 15-, 30-, and 60-minute horizons.
Data Organization
- cleaned/: Cleaned observations organized by year.
- train/: Development data from January 2022 to August 2026, used for training and time-based validation.
- test/: Held-out September 2026 data for final evaluation.
Validation months are November 2025, February 2026, May 2026, and July 2026. Each fold trains only on earlier data.
Fields
| Field | Description |
|---|---|
id |
Traffic sensor identifier |
fecha |
Observation timestamp in Madrid local time |
intensidad |
Traffic flow rate in vehicles per hour |
ocupacion |
Percentage of time the detector is occupied |
carga |
Municipal traffic-load index on a 0–100 scale |
Future targets are obtained by matching the same sensor at the requested forecast time.
Preprocessing
Files are processed incrementally. Records with invalid required values, non-15-minute timestamps, or quality flags other than N are removed. Missing values are not imputed.
Limitations
carga indicates road load, not congestion probability or travel time. Zero values may require sensor-specific interpretation. Missing intervals, duplicate timestamps, and daylight-saving transitions must be handled before modeling.
Source
Madrid City Council Open Data — Historical Traffic Measurements
This is an independently processed dataset for an academic machine learning project. Refer to the original source for applicable reuse terms and attribution requirements.
- Downloads last month
- 128