piebro commited on
Commit
ff45337
·
verified ·
1 Parent(s): 0e2ade2

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -0
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - time-series-forecasting
5
+ - tabular-regression
6
+ tags:
7
+ - transportation
8
+ - trains
9
+ - germany
10
+ - deutsche-bahn
11
+ - delays
12
+ - timetables
13
+ size_categories:
14
+ - 100M<n<1B
15
+ pretty_name: Deutsche Bahn Data
16
+ ---
17
+
18
+ # Deutsche Bahn Train Data
19
+
20
+ 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.
21
+
22
+ For more info visit the project page at GitHub: https://github.com/piebro/deutsche-bahn-data
23
+
24
+ ## Dataset Structure
25
+
26
+ ### Monthly Processed Data
27
+
28
+ The monthly processed data is located in `monthly_processed_data/` and contains files named `data-YYYY-MM.parquet`.
29
+
30
+ **Schema:**
31
+
32
+ | Column | Type | Description |
33
+ |--------|------|-------------|
34
+ | `station_name` | string | Name of the station |
35
+ | `xml_station_name` | string | Station name from the XML response |
36
+ | `eva` | string | EVA station number (unique identifier) |
37
+ | `train_name` | string | Name of the train (e.g., "ICE 123", "RE 5") |
38
+ | `final_destination_station` | string | Final destination of the train |
39
+ | `delay_in_min` | integer | Delay in minutes |
40
+ | `time` | timestamp | Actual arrival or departure time |
41
+ | `is_canceled` | boolean | Whether the train stop was canceled |
42
+ | `train_type` | string | Type of train (e.g., "ICE", "IC", "RE") |
43
+ | `train_line_ride_id` | string | Unique identifier for the train ride |
44
+ | `train_line_station_num` | integer | Station number in the train's route |
45
+ | `arrival_planned_time` | timestamp | Planned arrival time |
46
+ | `arrival_change_time` | timestamp | Actual/changed arrival time |
47
+ | `departure_planned_time` | timestamp | Planned departure time |
48
+ | `departure_change_time` | timestamp | Actual/changed departure time |
49
+ | `id` | string | Unique identifier for the train stop |
50
+
51
+ ### Raw Data
52
+
53
+ 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.
54
+
55
+ **Schema:**
56
+
57
+ | Column | Type | Description |
58
+ |--------|------|-------------|
59
+ | `timestamp` | timestamp | When the API request was made |
60
+ | `url` | string | The API endpoint URL that was queried |
61
+ | `api_name` | string | Name of the API (e.g., "timetables/v1/plan", "timetables/v1/fchg") |
62
+ | `query_params` | string | JSON string of query parameters used |
63
+ | `response_data` | string | Raw XML or JSON response from the API |
64
+ | `status_code` | string | HTTP status code of the response |
65
+ | `error` | string | Error message if the request failed |
66
+ | `duration_ms` | float | Request duration in milliseconds |
67
+ | `year` | integer | Year of the request (partition key) |
68
+ | `month` | integer | Month of the request (partition key) |
69
+ | `day` | integer | Day of the request (partition key) |
70
+
71
+ ## License
72
+
73
+ The dataset is licensed under [Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) by Deutsche Bahn.
74
+
75
+ ## Acknowledgments
76
+
77
+ Data sourced from Deutsche Bahn's public APIs. Special thanks to Deutsche Bahn for providing open access to this data.