Complete list of bus stops?

Greetings,

On TfL’s open data webpage (Our open data - Transport for London), one of the examples of data available is a list of bus stops in the region. I’ve been looking through the API documentation, but is there a way to obtain a complete list?

@itsbenchase

Welcome.

Yes, they’re all in https://tfl.gov.uk/tfl/syndication/feeds/journey-planner-timetables.zip in an XML format called transxchange.

As far as I am aware, the stops are spread over the several hundred individual route files within the Journey Planner Datastore zip file.

I found that the information that I already extract from them was actually capable with some tweaking of yielding a complete list of stops. I have uploaded this to

http://timetablegraveyard.co.uk/FullStopInfo.txt

This is a delimited file with five fields:-

  • NAPTAN stop code (typically 49000… for stops within Greater London)
  • Last date seen (see below)
  • Stop name
  • Easting
  • Northing

The “Last Date Seen” field has enabled me to include stops which have been suspended or dropped since November 2021. Some will definitely return when diversions end; others have been replaced or permanently closed. The date is meant to be the date of creation of the JP file and should not be taken as some form of withdrawal date.

Naturally any faults in the stop data in the original files will appear in the file that I have created. I hope that I have not added my own errors! Sometimes only the principal stops on a route are included in the file for the route; unless those stops are in another individual file they could be missing until it is corrected (another good argument for including apparently dropped stops).

Hope the file is of use.

1 Like

Is the file I have produced of any use to anybody? If not, I won’t bother thinking about how to update it efficiently.

Are we sure that the two csv files TfL produce are definitely NOT being updated anymore? @jamesevans

Simon

My impression is that although there are updates they are infrequent and sporadic, thus hard to rely upon. It would be useful to know what the updating timetable actually is.

Once upon a time Gerard’s weekly Journey Planner Newsletter listed all changes to stop data but I think there was an issue which prevented that, an issue which presumably was never resolved. That would have included the other codes for the stop, neither of which are in the Datastore Journey Planner files. Come to think of it, I don’t think I have seen a Newsletter for a few weeks now either.

The page @itsbenchase originally referred to says the files are updated weekly but I know the community here have had doubts about that.

@itsbenchase are you a registered TfL open data user?

Simon

@SJCooper I suspect that the page which states that the files are updated weekly is years out of date.

1 Like

Maybe that page also needs updating weekly :slight_smile:

2 Likes

@jamesevans Can you help before we resort to putting in some FoI requests? :wink:

Thanks!

@itsbenchase @SJCooper I think these are the files which have the data:

https://tfl.gov.uk/bus-stops.csv
https://tfl.gov.uk/bus-sequences.csv

They are generated automatically by an internal service and we try to upload these every week. They are snapshots of the entire bus stops so can sometimes contain errors but otherwise useful as a reference.

@neamanshafiq
Could I suggest that they are also placed in the data bucket so that the date of creation is visible to any user who is wondering whether they need to download again?

1 Like

The bus working timetables also present stop metadata for the minority of stops that are not formal Timing Points but rather surprisingly they do not seem to use the same basic source data as the stops.csv file. Although the stop names for a particular stop code are related, the WTTs show them in mixed rather than upper case and the spacing is sometimes different. The major difference is that special codes like [DLR} or <> which presumably indicate a station or similar are stripped out form the bus WTT info.

I don’t know whether it is any practical importance but the stop metadata in the bus WTTs ae not entirely consistent. For example stop 1078 (Kentish Town Road) is assigned transit node code A8K08 (Kentish Town Station) on all routes except the day 134, for which it is AU672 (Kentish Town Road). On the CSV file the transit node is shown as 8K08 (on the WTTs the codes are all prefixed by an additional A). There aren’t many of these though.

There are rather more cases where the stop is assigned different alpha codes amongst the WTTs (the alpha codes are not in the CSV file). For example, stop 1011 is CLTNKR for all routes except N38, for which it is CLTNPD. I know this ican occur as a result of diversions (change the stop but leave the alpha code alone) but I’m not sure this explains most of them. At Victoria three stops (7806, 33447 and BP5458) are shared between three different alpha codes and three more between two.

As I say, none of this may not affect “fitness for purpose” of the WTTs in the slightest but it is puzzling me a bit why the wheel seems to have been reinvented for the bus stop names.

1 Like