Repository navigation
Conversation
…server A probe reads Transitous's mirror of Europe's GTFS feeds, keeps rail routes, and prints per country the trips, stations and bundle sizes, then the search engine's memory and speed over all of them. It runs in its own workflow, on changes to it or by hand. readGtfsTimetable can skip the v1 rows.
davd-gzl
marked this pull request as ready for review
November 1, 2026 15:11
German feeds name many stops just "Hauptbahnhof", so keying stations by name merges towns. The GTFS reader now lists each name served by stations more than 3 km apart, and the probe counts them per country with examples.
Regional feeds name stops just "Gare SNCF", and bundles key stations by name, so trips jumped between towns. Within a feed and across a country's feeds, a name placed more than 3 km from its namesake now takes a number, "Gare SNCF (2)". The probe merges each country's feeds this way and shows which stations each searched name resolved to.
Munich's place took the name of its busiest station, a tram stop called "Hauptbahnhof (U, Tram)". A name the place's other stations share (München Hbf, München Hauptbahnhof) now wins over a busier one that doesn't name the town.
Counting only differently named stations favoured an odd one out: Zürich HB's place took another stop's name and left the Zürich town. A place now takes the name most of its stations normalize to, then one sharing a word with most, then the busiest.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: we didn't know how big "every train in Europe" is, so we couldn't size a search server for it. Also, stations sharing a name in different towns ("Gare SNCF" in 13 French towns) became one station, and Munich's place was named after a tram stop called "Hauptbahnhof (U, Tram)".
After: a "Europe probe" workflow reads every rail feed of the 33 Interrail countries. Its run summary lists, for each country, the trips, stations, bundle size and the names it had to tell apart. It then shows the engine's memory, load time and search times over all of Europe at once. Same-name stations more than 3 km apart stay separate ("Gare SNCF (2)"), and a place takes a name its stations share ("München Hbf").
First results: 405k trips and 39k stations in 32 countries (Bosnia missing). That is 13.8 MB gzipped. The engine holds it in about 300 MB of heap and answers in 0.03 to 0.6 s.
How:
scripts/probe-europe.tslists Transitous's feed mirror (https://api.transitous.org/gtfs/, which invites reuse) and downloads one feed at a time. It keeps GTFS rail routes (route_type 2 and 100–117), merges each country's feeds with the newmergeTimetables, and encodes one v2 bundle per country. It then loads them all intoNetworkand times sample searches and a one-day "reachable from Paris".readGtfsTimetablegains{ v1: false }, which skips the per-stop-pair rows. It now keys stations by id and numbers a name used for places more than 3 km apart, reporting those names insameName.Network, a place's name is now one its other stations share, with ties going to the busiest station.npm run probe:europe -- <folder of zips>.Stacked on #15.