Support for multiple data sources #2013
Replies: 7 comments 2 replies
-
The transport-apis project has many transit APIs listed; It intends to be the "source of truth" for basic information about these APIs (their endpoints, authentication mechanisms, licensing scheme, etc.), so that projects don't need to keep track of these changes each individually. If there is anything missing over there, please create an Issue or submit a PR! |
Beta Was this translation helpful? Give feedback.
-
Regarding the actual idea being discussed here:
I have brainstormed more about some technical aspects topic in Why linked open transit data?, stable-public-transport-ids, and experimented with fusing >1 (HAFAS-like) data source in pan-european-public-transport. TLDR: Adding another data source is technically feasable, but how do we create a usable UX from that? |
Beta Was this translation helpful? Give feedback.
-
I'm currently working on a really hacky POC to inject GTFS data into the DB-Rest response so that we might be able to combine multiple data sources without having to drastically change our internal project's structure. The repo will be made publically available around the start of the GPN next week. Currently, it's forwarding the departure request directly to db-rest v5 while simultaneously searching for departures on that IBNR. The departures provided via GTFS are then injected into the JSON. To determine what endpoint to call when we're getting a journey request, I simply took inspiration from the current HAFAS-Trip-IDs and added a "GTFS|{gtfs-id}" prefix to the trip IDs. This might be extended to combine multiple APIs from multiple (overlapping) data sources, but the first step might be, to add ÖBB, SNCF, SBB, etc., and restrict them to regular public transport like busses and trams, which are not covered by DB's HAFAS system. I might have a few ideas to combat your above-mentioned problems:
This is all in its infancy at the moment but already describes the rough direction I'd like to go. P.S.: speaking of GPN - will we see you there? 👀 |
Beta Was this translation helpful? Give feedback.
-
It's unfortunately limited to trains within Finland, but the Fintraffic API is awesome: https://www.digitraffic.fi/en/railway-traffic/ |
Beta Was this translation helpful? Give feedback.
-
This is very similar to what I've been doing with match-gtfs-rt-to-gtfs: It tries to match data from a HAFAS API (e.g. the DB one) to a GTFS dataset by matching their stop/trip/route IDs/names/locations. Over time, I've invested quite a lot of effort to make the matching logic fast and flexible enough. For example, it can match a HAFAS stop with a GTFS stop even when they don't share an ID (IBNR), have slightly different names, and slightly different geolocations. Unfortunately, the code has many indirections and isn't well-documented. Also, it's been a while since I've tested it with the DB HAFAS endpoint. But if you're interested, take a look!
You might also want to look into Multiformats as a generalized and future-proof mechanism for "combining IDs".
The Trainline stations database might be very helpful with this. |
Beta Was this translation helpful? Give feedback.
-
Hello, is it planned to support navitia.io API? It exposes SNCF/RATP data and many more operators across Europe |
Beta Was this translation helpful? Give feedback.
-
Would it be possible for users in foreign countries to at least create their own schedules to earn points or at the minimum edit e.g. wrong milage? The distance calculated is only from station to station via air and not via the actual route, which leads to differences compared to what's actually being driven. This is especially easy with Máv, since they give you the actual milage on every train ticket, which would be easy to edit in |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
Currently, Traewelling relies solely on DB-Rest asthe only data source, which is a wrapper for the HAFAS of Deutsche Bahn. This limits our data availability to Germany and a few major connections in neighboring countries. Trams, buses, and other public transportation modes in foreign countries are often not included. To provide a more comprehensive service, we need to expand our data sources to include information from multiple providers.
Describe the solution you'd like
We aim to enhance Träwelling by integrating multiple data sources to gather public transportation data. This would allow users to check in for rides across borders. We are seeking data sources that cover a wide range of locations, both within and outside of Germany, to provide users with a more extensive coverage.
Describe alternatives you've considered
/
Additional context
/
Expanding our data sources would greatly improve the usability and inclusivity of our service, allowing users to benefit from a wider range of public transportation options both domestically and internationally. Any suggestions or recommendations for reliable data sources with comprehensive coverage would be greatly appreciated.
Please feel free to contribute any relevant information, ideas, or suggestions for potential data sources to this issue. Thank you for your support!
Beta Was this translation helpful? Give feedback.
All reactions