Deutsche Bahn Train Delay and Cancellation Data
- Provider
- Deutsche Bahn (source data); collected by piebro
- License
- CC-BY-4.0 (source)
- Size
- 2,127 files
- Format
- Parquet (in sampled files)
- Stored at
- Hugging Face (https://huggingface.co/datasets/piebro/deutsche-bahn-data)
- Access
- Free and public. No account with the data provider is needed.
- Category
- Machine Learning & AI
- Source
- https://github.com/piebro/deutsche-bahn-data
About Deutsche Bahn Train Delay and Cancellation Data
Historical train schedules, delays and cancellations for stations across Germany, collected continuously from the Deutsche Bahn Timetables API, the public interface behind departure boards. Monthly processed Parquet files (monthly_processed_data/data-YYYY-MM.parquet, from July 2024 onwards at measurement, about 60 MB per month early on and about 350 MB per month from November 2025) hold one row per train stop with station name and EVA number, train type, train number, line number, final destination, planned and changed arrival and departure times, delay in minutes, arrival and departure cancellation flags and ride identifiers. Separate folders give the planned timetable and change streams, and raw_data/ keeps every API response (XML or JSON) partitioned by year, month and day with request metadata. The repository uses about 134 GB (measured 2026-11-14). Uses include railway punctuality analysis, delay propagation and prediction, network reliability, transport policy evaluation and time series and graph learning on transit networks. Read with pandas, polars or DuckDB; the GitHub project documents the collection. Deutsche Bahn publishes the Timetables API data under CC BY 4.0; attribute Deutsche Bahn AG.
How to load Deutsche Bahn Train Delay and Cancellation Data in Python
from datasets import load_dataset
ds = load_dataset("piebro/deutsche-bahn-data")
print(ds)Data structure
File types in sampled files: Parquet
Files
Example file: monthly_processed_data/data-2024-07.parquet
Analyze this dataset without downloading it
On Scigantic, Deutsche Bahn Train Delay and Cancellation Data opens in a hosted JupyterLab notebook with the data already mounted, so you can read files where they are stored instead of copying them first. Each notebook includes an AI assistant that can see the mounted files and write and run analysis code. Open the dataset page to launch a notebook, or browse the full catalog.
This page is also available as Markdown and as JSON.
Related Machine Learning & AI datasets
- Nemotron RL Bixbench Hypothesis
- Amazon-PQA
- ASL 1000
- The Massively Multilingual Image Dataset (MMID)
- RxR (Room-Across-Room): Multilingual Vision-and-Language Navigation Instructions in English, Hindi and Telugu with Pose Traces for Matterport3D (Google Research)
- Milling Tool Wear Time Series across Three Machine Tools (Flank Wear VB, Forces, Spindle Torque)
- Answer Reformulation
- VoiSeR