-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document which routes are GTFS-based & which HAFAS-based #45
Comments
You're fetching
An curl 'https://v5.vbb.transport.rest/stops/900000100040?linesOfStops=true' -s | jq {
"type": "stop",
"id": "900000100040",
"name": "Mollstr./Otto-Braun-Str.",
"location": {
"type": "location",
"id": "900100040",
"latitude": 52.525185,
"longitude": 13.419942
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"lines": [
{
"type": "line",
"id": "12",
"fahrtNr": null,
"name": "12",
"public": true,
"mode": "train",
"product": "tram",
"symbol": null,
"nr": 12,
"metro": false,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#6c5b98"
}
},
{
"type": "line",
"id": "50",
"fahrtNr": null,
"name": "50",
"public": true,
"mode": "train",
"product": "tram",
"symbol": null,
"nr": 50,
"metro": false,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#16a696"
}
},
{
"type": "line",
"id": "m1",
"fahrtNr": null,
"name": "M1",
"public": true,
"mode": "train",
"product": "tram",
"symbol": "M",
"nr": 1,
"metro": true,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#ed9222"
}
},
{
"type": "line",
"id": "m2",
"fahrtNr": null,
"name": "M2",
"public": true,
"mode": "train",
"product": "tram",
"symbol": "M",
"nr": 2,
"metro": true,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#7eb43d"
}
},
{
"type": "line",
"id": "m4",
"fahrtNr": null,
"name": "M4",
"public": true,
"mode": "train",
"product": "tram",
"symbol": "M",
"nr": 4,
"metro": true,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#d01c22"
}
},
{
"type": "line",
"id": "m5",
"fahrtNr": null,
"name": "M5",
"public": true,
"mode": "train",
"product": "tram",
"symbol": "M",
"nr": 5,
"metro": true,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#c48946"
}
},
{
"type": "line",
"id": "m6",
"fahrtNr": null,
"name": "M6",
"public": true,
"mode": "train",
"product": "tram",
"symbol": "M",
"nr": 6,
"metro": true,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#01609c"
}
},
{
"type": "line",
"id": "m8",
"fahrtNr": null,
"name": "M8",
"public": true,
"mode": "train",
"product": "tram",
"symbol": "M",
"nr": 8,
"metro": true,
"express": false,
"night": false,
"color": {
"fg": "#fff",
"bg": "#f47922"
}
},
{
"type": "line",
"id": "142",
"fahrtNr": null,
"name": "142",
"public": true,
"mode": "bus",
"product": "bus",
"symbol": null,
"nr": 142,
"metro": false,
"express": false,
"night": false
},
{
"type": "line",
"id": "200",
"fahrtNr": null,
"name": "200",
"public": true,
"mode": "bus",
"product": "bus",
"symbol": null,
"nr": 200,
"metro": false,
"express": false,
"night": false
}
]
}
How do you do that? Where do you get the number of trips from? |
I can provide a pseudo code.
I'm using python, you can check the script that I'm writing. Problematic part is line 186 https://gist.github.com/Cediddi/cfcf84aa3541a46beeee4064e3e33e40#file-allons_y-py-L186 |
Ah, now I understand the problem! These routes just return GTFS data:
The other routes (including Unfortunately, the GTFS stop/station IDs & line IDs don't always match the HAFAS stop/station IDs & line IDs. Most of the times they work with HAFAS, but "haltepunkt"-like stop IDs (e.g. those of individual tram tracks at a station) apparently don't. Sorry, this is really not documented at all. 😔 |
Can you tell me what you would like to build? Maybe I can tell you how to solve this with the |
It is a coding challenge for a job application, thus I cannot share the question. I think this API needs an open api documentation, other than that I think it's a great api and really easy to use and understand. |
Completely agree, I've been planning to add an Open API spec for a while, just haven't found the time & motivation to do it yet.
Well, I disagree in regards to the opaque HAFAS/GTFS distinction. |
Hi, I'm trying to use this library and I'm following a workflow like this:
Last step throws an error like this:
The query I'm running looks like this
https://v5.vbb.transport.rest/stops/070301009267
I think my workflow is correct and this is a bug. Can you confirm?
The text was updated successfully, but these errors were encountered: