Skip to content

Project: Open Night Train Database

The lack of information about night trains, let alone the lacking single platform to book a train from one place in Europe to another, is obviously one of the major obstacles in promoting the usage of night trains. Various projects tried to fill the gap but maintaing complete and up-to data is a task no single project has yet achieved. As bad information can be worse than no information the idea of this project is to invite different, partially competing actors actors across Europe to join forces based on the priciples of open data and open source in order to achieve our common goal of better information services on night trains better and quicker than each for themselves.

im A first meeting Peter, Joachim and Juri (form B-o-T Germany) gathered Timo (night-ride.ch), Tobias (@tobiaswatzl), Grégoire (Oatdn), Sibylle (SBB/BoT Switzerland); Florian, Yvonne (nachtzugkarte.de) were excused.

First Results:

  • There is a common interest to join forces to enable a better information services to night train passengers (including daytrains would be beyond scope)
  • While some participants would like to keep their interface, possibly even for commercial purposes, there was a common interest in contributing to a joint open sorce data base. Open source should thus allow for commercial usage. 
  • Software used for gathering data shall be open source too in order to cover as many operators as possible.
  • The maintainer should be charitable organisation. This will be Back-on-Track Germany e.V. for the time being. We asked Openrailfoundation to step in, as this would be even better, however, their focus is on sharing software, not data, so they will not take care for our infrastructure any time soon.
  • To allow for different editors to contribute and correct parts of the data we will use GitHub Google Sheets.
  • Our GitHub Account will also be used for managing versions of the static data files, scrapers, assigning tasks and discussing solutions.
  • We will structure static general night train information as GTFS-compliant as possible. This will ease exporting and hopefully importing GTFS-compliant data files. This standard can also be used to make train data availabe in applications like Google Flights to promote trains as a sustainable alternative, so datasets will be available.
  • For instant discussions we use a Slack workspace. Participants are advised not to mute the general channel, nor to spam the general channel with infomations that belong in sub-channels.
  • BoT DE funds server space for establishing the database for storing dynamic data.

Conceptual decisions so far:

  • We store seldomly & manually maintaned data as CSV / SQlite file in Github. We store frequently & automatically updated data (from scrapers or APIs) in an relational DB. The database will also import the manually maintained data. 
  • Acces will be free but require authentication.
  • We will not support NeTEx Standard any time soon as it requires too much learning. However it seems to be pretty straightforward to follow the GTFS reference when storing our static data.

Open Tasks:

  • Open GitHub and Slack account with charity conditions
  • Rent server space at Hetzner.
  • Static data conception with default data
  • Complete static data including rough itineraries (or use data from nachtzugkarte.de)
  • Align static data with GTFS namespace
  • Clarify the API requirements for services using only static data
  • If nachtzugkarte.de is unavailable for POC:
    • Design WordPress displaying a full-scale, scaleable map and an infobox pop-up
    • Implement as a WordPress (Gutenberg) plug-in
  • POC1: display static data on a SVG-based map. (nachtzugkarte.de and/or nighttrains.net)
  • Dynamic data conception with default data
  • Setup of the Dynamic Database
  • Adapt existing ÖBB Collector(s) to create dynamic data
  • Adapt ÖBB Collector to be controlled by analyzing static data (calendar)
  • Clarify the API requirements for services using dynamic data
  • POC2: display dynamic data on a SVG-based map (nachtzugkarte.de and/or nighttrains.net)
  • Create a new collector forn a different operator
  • Get a sample GTFS file from an operator
  • Test a GTFS importer
  • dynamic map display of routes based on departure location and date
  • Roll-Out