Home

Awesome

vbb-change-positions

Crowd sourced database of station-specific platform positions for changes between VBB (Verkehrsverbund Berlin-Brandenburg) metro, suburban and regional lines.

You're invited to help, see the data structure and contributing sections!

npm version Build Status Greenkeeper badge dependency status dev dependency status License: ODbL chat on gitter

Installation and Usage

If you're using JavaScript, you can use the package by installing:

npm install vbb-change-positions
const readChangePositions = require('vbb-change-positions')

const changePositions = readChangePositions()
changePositions.on('data', console.log)

changePositions will be a readable stream in object mode.

{
    fromStation: {
        id: "900000045102",
        name: "Heidelberger Platz"
    },
    fromLines: ["S42","S46"],
    previousStation: {
        id: "900000044101",
        name: "Hohenzollerndamm"
    },
    fromPosition: 1,
    toStation: {
        id: "900000045102",
        name: "Heidelberger Platz"
    },
    toLines: ["U3"],
    nextStation: {
        id: "900000045101",
        name: "Rüdesheimer Platz"
    },
    toPosition: 1,
    samePlatform: false
}

Browser support

Using bundlers like WebPack or browserify, this package will work in the browser. Keep in mind that it contains quite a lot of data (~200k uncompressed, ~10k gzipped).

Data structure

The dataset is located in data.ndjson, a ndjson file which you can edit using a text editor or vbb-change-positions-cli.

Let's take the following example: I want to take the S46 in the direction of Königs Wusterhausen to Heidelberger Platz, where I want to change to the U3 towards Krumme Lanke.

an illustration of the keys

The dataset row would then contain the following information:

key namedescriptionrequiredexample
fromStationStation at which you arrive. Object containing the keys below.yes{id: "900000045102", name: "Heidelberger Platz"}
fromStation.idArrival station ID*yes900000045102
fromStation.nameArrival station name (only for readability of the dataset)noHeidelberger Platz
fromLines"Arriving" line names. Note that the lines must run on the same platform and share the same fromStation. For the lines that fit those criteria, there should exist only one dataset row grouping them, though. This key exists mostly because information on fromTrack is much harder to get/remember than the rather simple line names and sometimes the track changes but the platform doesn't.yes["S42", "S46"]
previousStationPrevious station on the line before changing. Object containing the keys below.yes{id: "900000044101", name: "Hohenzollerndamm"}
previousStation.idPrevious station ID*yes900000044101
previousStation.namePrevious station name (only for readability of the dataset)noHohenzollerndamm
fromTrackArrival platform (track)**noempty
fromPositionNumber where to leave the arrival platform. Between 0 (at the rear end of the station) and 1 (at the front "driver's" end of the station) ***yes1
toStationStation at which you depart. Mostly the same as fromStation, but different for interchanges like Kaiserdamm <-> Messe Nord/ICC that are marked as one node on the public transport map. Object containing the keys below.yes{id: "900000045102", name: "Heidelberger Platz"}
toStation.idArrival station ID*yes900000045102
toStation.nameArrival station name (only for readability of the dataset)noHeidelberger Platz
toLines"Departing" line names, see fromLinesyes["U3"]
nextStationNext station on the line after changing. Object containing the keys below.yes{id: "900000045101", name: "Rüdesheimer Platz"}
nextStation.idNext station ID*yes900000045101
nextStation.nameNext station name (only for readability of the dataset)noRüdesheimer Platz
toTrackDeparture platform (track)**noempty
toPositionNumber where to enter the departure platform.*** See also fromPosition.yes1
samePlatformSet to true if both trains stop at the same platform (entire platform, not "only" track). fromPosition and toPosition will be ignored and should be set to 0.5nofalse

* See this document if you don't know how to find out some station's VBB station ID

** If unknown, just leave empty/unset like I did here.

*** see additional guidelines

Finally, our example would give us the following data row for the NDJSON file:

{"fromStation":{"id":"900000045102","name":"Heidelberger Platz"},"fromLines":["S42","S46"],"previousStation":{"id":"900000044101","name":"Hohenzollerndamm"},"fromPosition":1,"toStation":{"id":"900000045102","name":"Heidelberger Platz"},"toLines":["U3"],"nextStation":{"id":"900000045101","name":"Rüdesheimer Platz"},"toPosition":1,"samePlatform":false}

Additional guidelines

Parallel lines

There's a common situation where multiple lines run in parallel for a few stations in a row, like S41/S42 and S46 between Westend and Neukölln or S1 and S2 between Yorckstraße and Bornholmer Straße. A general rule of thumb for this case is that only if it's your last chance to change between two lines at a station, this specific interchange scenario should be mapped. However, if it's a common things for commuters to change at another station than the "last possible", then and only then that station should be added as well. To give you a few examples:

Other

Contributing

Please note that this dataset only contains data for metro, suburban and regional lines; buses and trams are not included.

Have a look at this list for an overview of stations that are not yet covered.

If you want to add information to the dataset, fork this repository, add information and finally submit a pull request. If you don't know how any of this works, you can also just open an issue with the information you want to add in text form and I'll add it to the dataset for you. The same applies if you have found an error or want to change anything about the data structure.

Please note that by contributing to this project, you waive any copyright claims on the information you add.

License

This dataset is licensed under the ODbL license (v1.0).