• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Local Bus Services' Bus Stops in Scotland

Status
Not open for further replies.

computerSaysNo

Established Member
Joined
14 Dec 2018
Messages
1,668
I'm looking for a downloadable csv, or similar format, containing a list of all the bus stops that any given Local Service is registered to call at. This is what I imagine is in the Traveline National Dataset, but one needs to register and wait a few days before they can access the data; I was hoping somebody here could confirm that that is indeed what the Dataset contains?
[URL='https://www.travelinedata.org.uk/traveline-open-data/traveline-national-dataset/']Traveline National Dataset[/URL] said:
The Traveline National DataSet (TNDS) is compiled from data sourced in TransXchange (TXC) 2.1 from the English Traveline regions, Traveline Scotland, and Traveline Wales. TNDS contains public transport timetables for bus, light rail, tram and ferry services in Great Britain.
Context: I'm hoping to make a scale model bus with a fully working/interactive destination display. I want the destination display software to be capable of selecting and showing as wide a range of destinations as possible, such that the same software can be used for destination displays across multiple bus operators, but also for the "route and destination selection" process to be as realistic as possible (i.e. you can't enter a route or destination which doesn't exist). A very rough technique I am planning to use is:
  1. Software starts, connects to internet, reads in Bus Operator data, populates list box with available bus operators.
  2. User selects a bus operator.
  3. Software filters all routes on the selected bus operator, populates list box with list of all routes the bus operator runs.
  4. User selects a route.
  5. Software reads timetable data for the selected route and extracts the "bus stop code" for all the stops the selected service is scheduled to make. Software converts the bus stop codes to the actual names of the bus stops. Software populates list box with names of all stops after removing duplicates.
  6. User selects destination stop.
  7. Software sends route number and destination text to destination screen.
I've already accessed and processed the DfT file relating to individual Bus Stops, so I just need data to add Routes, and to associate said routes with Stops.
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

borage

Member
Joined
21 Feb 2018
Messages
176
The DfT has helpfully converted that Traveline data into the nicer CSV-based (comma separated values) GTFS (general transit feed specification) format, which is free to download instantly: https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/scotland/

trips.txt contains the "headsigns" for each trip:
Code:
route_id,service_id,trip_id,trip_headsign,block_id,shape_id,wheelchair_accessible,vehicle_journey_code
17597,0,VJ14585599b09a4f196366171fe7e6eb4d34b97b34,"Glasgow",,,0,1102
17597,1,VJ3f4dfb7b6d61eab1e51f5a8ee94a55ba134c6939,"Victoria",,,0,1113
17597,2,VJbdb80b967260687dc1a36e9f9647055002c1f43f,"Edinburgh",,,0,1116
17597,3,VJ815b82559e74cdace0c8b0a16dbb1e3f83b4d90b,"Glasgow",,,0,1118
[...]
routes.txt has the route names for each route_id:
Code:
route_id,agency_id,route_short_name,route_long_name,route_type
17597,OP564,"M11","",200
63858,OP5051,"091","",200
[...]
and stop_times.txt has the stop codes etc for each trip:
Code:
trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,timepoint
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,08:00:00,08:00:00,490014051VC,0,"",0,1,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,10:45:00,10:45:00,43001321701,1,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,12:30:00,12:30:00,1800MABS0B1,2,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,13:00:00,13:00:00,1800SHIC0G1,3,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,14:10:00,14:10:00,25003126,4,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,14:50:00,14:50:00,2500918,5,"",0,0,,1
[...]
 

computerSaysNo

Established Member
Joined
14 Dec 2018
Messages
1,668
The DfT has helpfully converted that Traveline data into the nicer CSV-based (comma separated values) GTFS (general transit feed specification) format, which is free to download instantly: https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/scotland/

trips.txt contains the "headsigns" for each trip:
Code:
route_id,service_id,trip_id,trip_headsign,block_id,shape_id,wheelchair_accessible,vehicle_journey_code
17597,0,VJ14585599b09a4f196366171fe7e6eb4d34b97b34,"Glasgow",,,0,1102
17597,1,VJ3f4dfb7b6d61eab1e51f5a8ee94a55ba134c6939,"Victoria",,,0,1113
17597,2,VJbdb80b967260687dc1a36e9f9647055002c1f43f,"Edinburgh",,,0,1116
17597,3,VJ815b82559e74cdace0c8b0a16dbb1e3f83b4d90b,"Glasgow",,,0,1118
[...]
routes.txt has the route names for each route_id:
Code:
route_id,agency_id,route_short_name,route_long_name,route_type
17597,OP564,"M11","",200
63858,OP5051,"091","",200
[...]
and stop_times.txt has the stop codes etc for each trip:
Code:
trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,timepoint
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,08:00:00,08:00:00,490014051VC,0,"",0,1,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,10:45:00,10:45:00,43001321701,1,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,12:30:00,12:30:00,1800MABS0B1,2,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,13:00:00,13:00:00,1800SHIC0G1,3,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,14:10:00,14:10:00,25003126,4,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,14:50:00,14:50:00,2500918,5,"",0,0,,1
[...]
Ah that sounds perfect, thanks! I'll have a look at it when I'm back home later.

== Doublepost prevention - post automatically merged: ==

The DfT has helpfully converted that Traveline data into the nicer CSV-based (comma separated values) GTFS (general transit feed specification) format, which is free to download instantly: https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/scotland/

trips.txt contains the "headsigns" for each trip:
Code:
route_id,service_id,trip_id,trip_headsign,block_id,shape_id,wheelchair_accessible,vehicle_journey_code
17597,0,VJ14585599b09a4f196366171fe7e6eb4d34b97b34,"Glasgow",,,0,1102
17597,1,VJ3f4dfb7b6d61eab1e51f5a8ee94a55ba134c6939,"Victoria",,,0,1113
17597,2,VJbdb80b967260687dc1a36e9f9647055002c1f43f,"Edinburgh",,,0,1116
17597,3,VJ815b82559e74cdace0c8b0a16dbb1e3f83b4d90b,"Glasgow",,,0,1118
[...]
routes.txt has the route names for each route_id:
Code:
route_id,agency_id,route_short_name,route_long_name,route_type
17597,OP564,"M11","",200
63858,OP5051,"091","",200
[...]
and stop_times.txt has the stop codes etc for each trip:
Code:
trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,timepoint
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,08:00:00,08:00:00,490014051VC,0,"",0,1,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,10:45:00,10:45:00,43001321701,1,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,12:30:00,12:30:00,1800MABS0B1,2,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,13:00:00,13:00:00,1800SHIC0G1,3,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,14:10:00,14:10:00,25003126,4,"",0,0,,1
VJ14585599b09a4f196366171fe7e6eb4d34b97b34,14:50:00,14:50:00,2500918,5,"",0,0,,1
[...]
Where did you find the website page for this? I can't find the actual page anywhere, searching the data.gov.uk site only returns the Greater Manchester dataset.
 
Last edited:
Status
Not open for further replies.

Top