Created
October 6, 2024 00:42
-
-
Save met/74b234be20f201b6c5b964075e952d21 to your computer and use it in GitHub Desktop.
Get line routes from static GTFS
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
SELECT | |
route_short_name, stop_name, route_long_name, stop_sequence, route_stops.route_id, route_stops.stop_id | |
FROM | |
read_csv_auto("route_stops.txt") as route_stops | |
INNER JOIN | |
read_csv_auto("routes.txt") as routes ON route_stops.route_id = routes.route_id | |
INNER JOIN | |
read_csv_auto("stops.txt") as stops ON route_stops.stop_id = stops.stop_id | |
WHERE | |
route_stops.direction_id = 0 | |
ORDER BY | |
route_short_name ASC, | |
route_stops.stop_sequence ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment