Skip to content

patrickbr/db-api-to-gtfs

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
February 28, 2016 23:22
January 15, 2020 18:05
January 28, 2018 11:27

db-to-gtfs

Convert the timetable data published through the DB API to a GTFS feed.

An example feed valid from February 28th to May 1rst can be found here.

Update: A complete GTFS feed for Germany (including busses, subways, trams, long distance, regional and urban rail) can now be found here: http://gtfs.de

Usage

Get a GTFS feed valid from May 1st to August 1st 2016

$ ./db_to_gtfs.py --api-key <your api key> --start-date 2016-5-1 --end-date 2016-8-1

Method

The script begins at seed stations (Berlin Hbf, by default) and crawls to every station reachable by trips from the seed stations. Trips, routes and service dates are collected on the way and ultimately written to the GTFS files.

Flags

See

$ ./db_to_gtfs.py --help

for available command line arguments.

Obtain API key

See http://data.deutschebahn.com/apis/fahrplan/

License

See LICENSE.

About

Small hack to convert data from the Deutsche Bahn API into a valid GTFS feed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages