|
Download README.md from LauraTrpp/deutsche-bahn-data: direct link, hf CLI and curl.
- Browser
- Download file 3.53 kB
-
https://huggingface.co/datasets/LauraTrpp/deutsche-bahn-data/resolve/main/README.md
- Command line
-
hf download hf://datasets/LauraTrpp/deutsche-bahn-data/README.md
-
curl -L -o README.md https://huggingface.co/datasets/LauraTrpp/deutsche-bahn-data/resolve/main/README.md
3.53 kB
| license: cc-by-4.0 | |
| task_categories: | |
| - time-series-forecasting | |
| - tabular-regression | |
| tags: | |
| - transportation | |
| - trains | |
| - germany | |
| - deutsche-bahn | |
| - delays | |
| - timetables | |
| size_categories: | |
| - 100M<n<1B | |
| pretty_name: Deutsche Bahn Data | |
| # Deutsche Bahn Train Data | |
| This dataset contains public historical data from Deutsche Bahn, the largest German train company. It includes train schedules, delays, and cancellations from stations across Germany. | |
| For more info visit the project page at GitHub: https://github.com/piebro/deutsche-bahn-data | |
| ## Dataset Structure | |
| ### Monthly Processed Data | |
| The monthly processed data is located in `monthly_processed_data/` and contains files named `data-YYYY-MM.parquet`. | |
| **Schema:** | |
| | Column | Type | Description | | |
| |--------|------|-------------| | |
| | `station_name` | string | Name of the station | | |
| | `xml_station_name` | string | Station name from the XML response | | |
| | `eva` | string | EVA station number (unique identifier) | | |
| | `train_number` | string | Train number / Zugnummer, the raw `tl.n` value identifying a specific train run (e.g., "123", "12603"). Combine with `train_type` for a label like "ICE 123" | | |
| | `line_number` | string | Line number / Liniennummer, the raw `ar.l`/`dp.l` value identifying the route, non-unique (e.g., "RB23", "14"); null for long-distance trains (ICE/IC/EC) where the API provides no line | | |
| | `final_destination_station` | string | Final destination of the train | | |
| | `delay_in_min` | integer | Delay in minutes | | |
| | `time` | timestamp | Actual arrival or departure time | | |
| | `arrival_is_canceled` | boolean | Whether the arrival at the train stop was canceled | | |
| | `departure_is_canceled` | boolean | Whether the departure from the train stop was canceled | | |
| | `train_type` | string | Type of train (e.g., "ICE", "IC", "RE") | | |
| | `train_line_ride_id` | string | Unique identifier for the train ride | | |
| | `train_line_station_num` | integer | Station number in the train's route | | |
| | `arrival_planned_time` | timestamp | Planned arrival time | | |
| | `arrival_change_time` | timestamp | Actual/changed arrival time | | |
| | `departure_planned_time` | timestamp | Planned departure time | | |
| | `departure_change_time` | timestamp | Actual/changed departure time | | |
| | `id` | string | Unique identifier for the train stop | | |
| ### Raw Data | |
| The raw data is located in `raw_data/` and is partitioned by `year={year}/month={month}/day={day}/`. Each partition contains multiple parquet files with hourly data. | |
| **Schema:** | |
| | Column | Type | Description | | |
| |--------|------|-------------| | |
| | `timestamp` | timestamp | When the API request was made | | |
| | `url` | string | The API endpoint URL that was queried | | |
| | `api_name` | string | Name of the API (e.g., "timetables/v1/plan", "timetables/v1/fchg") | | |
| | `query_params` | string | JSON string of query parameters used | | |
| | `response_data` | string | Raw XML or JSON response from the API | | |
| | `status_code` | string | HTTP status code of the response | | |
| | `error` | string | Error message if the request failed | | |
| | `duration_ms` | float | Request duration in milliseconds | | |
| | `year` | integer | Year of the request (partition key) | | |
| | `month` | integer | Month of the request (partition key) | | |
| | `day` | integer | Day of the request (partition key) | | |
| ## License | |
| The dataset is licensed under [Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) by Deutsche Bahn. | |
| ## Acknowledgments | |
| Data sourced from Deutsche Bahn's public APIs. Special thanks to Deutsche Bahn for providing open access to this data. |