Bus Locations Data LineRef

Hi TfL team,

I’m new to this, but I was wondering if there is a way to plot the LineRef that the BODS location data feed provides?

Thanks!

Welcome @dd_19

If you just want to look at it, transform it into KML

and load the .KML file into Google Earth (it’s free)

(click “Download Earth Pro on desktop”)

Here’s the Liz line and the Overground …

Hey @briantist,

Thanks a lot for the reply. Let me give some background. I used the BODS API to pull location data of a bus. I’m trying to see when it’s on route and when it’s not.

I have the lineREF that BODS reports in its API, but I’m not sure how to plot it or connect it to a more visible dataset. Appreciate it if you or anyone else have any ideas?

HI

You will be needing either https://api.tfl.gov.uk/Line/{ids}/Arrivals (for a whole route) or https://api.tfl.gov.uk/Line/{ids}/Arrivals/{stopPointId}[?direction][&destinationStationId] (for a stop).

If you need multiple bus lines, that 's multiple Ids, but you can do them in parallel with a “multicurl”.

The link to docs for the arrivals get is APIs: Details - Transport for London - API

Thanks @briantist. I’ll give that a shot