Introducing Web App to Analysis TfL Open Data

As part of my learning curve of the TfL API, I’m building a desktop web app that I would like to freely share with users of this Tech Forum.

The aim of the app is to help analysis the open data supplied by TfL.

Initially, I will use the CSV data files (stored in db) and as my knowledge (and spare time!) increases I will integrate API calls (as advised by @briantist and @mjcarchive).

Initial release will provide some basic analysis of the buses:

  1. buses (777)

  2. bus stops (20,102)

  3. London boroughs (32), extending to outer London boroughs (Brentwood, Dartford, Hertsmere, Watford etc)

Screenshot below…comments will be welcomed!

Screenshot%20-%20LTr%20Desktop%20-%2001

Did you, perhaps @LondonTravel intent to post a link?

@briantist

Apologies, I need to negotiate some server space to host the app as I am going to make it freely available. Hope to sort it out in the earlier part of the week, configure and share the link.

@briantist

Stealing some time to finish the app…

Need to clean up the data being displayed. In the bus-sequences.csv file, the route (line) 23A has several (3) “run pairs”. Wanted to clarify the route via the API call

https://api.tfl.gov.uk/Line/23A/Route

The response received was:

{
“$type”: “Tfl.Api.Presentation.Entities.ApiError, Tfl.Api.Presentation.Entities”,
“timestampUtc”: “2020-02-18T22:54:42.0164142Z”,
“exceptionType”: “EntityNotFoundException”,
“httpStatusCode”: 404,
“httpStatus”: “NotFound”,
“relativeUri”: “/Line/23A/Route”,
“message”: “The following line id is not recognised: 23A”
}

Should I treat this as an invalid route (withdrawn) and omit this route (and others)? (screenshot attached showing the blank route name.

Cheers.

Screenshot%20-%20LTr%20Desktop%20-%2002

Should I treat this as an invalid route (withdrawn) and omit this route (and others)? (screenshot attached showing the blank route name.

Yes, one of those. Accorrding to A Boris Bus visits a Ghostly Village

Route 23A runs just once a year, from outside a mainline train station to nowhere in particular via a totally empty village where no one lives.

That was an interesting read…

I did run the Search query call (as you previously advised) but it didn’t return any related info about 23A.

I’m curious about how you obtained your link to what is a 6+ year story.

Cheers.

I googled “tfl bus route 23a”… There is actually a newer story but I thought that the one I used had a better direct quote.

I find that IanVisits and Geoff Marshall are great explorers of anomalies in London’s transport system. Also https://www.londonreconnections.com/ and https://diamondgeezer.blogspot.com/ too. They’re all on on Twitter if you ever need to ask them something special.

Part of the fun with working with a 150-year old transport network is the anomalies: I can’t tell you how excited I was when I did a Hidden London visit to Highgate High Level station!

You may also find these sites useful

http://www.londonbusroutes.net/routes.htm#main

and

http://www.timetablegraveyard.co.uk/wt_index.html

There are some services which only run on two days of the year - for the Notting Hill Carnival. Route 2X is an example.

Michael

@briantist

Good old Google…takes the fun out of old school research!

Thanks for the links…love the Human Tube Map video!

Cheers.

@mjcarchive

Great resource to have for cross-referencing…love the no-frills format…just gimme the information!
The Forthcoming planned service changes is a gem!

Much appreciated.

@briantist

Need your expertise to clarify if the terminology I am using in my application is correct.

I have developed a form to present the Connectivity view of the Bus Stop Network Analysis.

So what is the Connectivity view?

  1. determine the total bus lines for each bus stop point

  2. produce a table grouped by the totals and

  3. show the list in descending order (similar to a Top Sales Chart)

Does this qualify as a Connectivity view or, what is the official term that is used within the transport industry?

I have provided a screenshot below.

Cheers.

@LondonTravel

The UK measure of Connectivity (which is the right word) is usually done using Public Transport Access Level.

PTAL is a measure of connectivity by public
transport, which has been used in various
planning processes in London for many years.
For any selected place, PTAL suggests how
well the place is connected to public transport
services. It does not cover trips by car.

@briantist

Thank for the knowledge.

The calculation of the PTAL has four inputs of which the number of services is one of the four (so I’m a quarter of the way there!)

Cheers.

1 Like

“Number of services” is pretty crude, mind. My nearest stop in Winchmore Hill Road has the luxury of four services. Trouble is, three of them are school services with at most a couple of journeys each way.

My reading of the PTAL is that while it reflects the number of services, the raw count of such services is not an input. Each route would contribute something but a once-a-day service would contribute next to nothing compared with a regular all day service. That makes perfect sense. If the once-a-day service made a significant difference to the PTAL it would say more about the measure than about actual connectivity.

Michael

Michael

@mjcarchive @LondonTravel

My personal way of working out the level of service is to get an average of the number of minutes a random person for a “tuning up and go”.

This is
m = 30 / n

where m is the average time in minutes and n is the number of services per hour.

Looking at this calculation in greater depth, it is possible to see that it changes during peak, for example, because there are more services, but you may not be able to board the first one.

I would, if it were me, take the average of m over the whole of a seven day period. Clearly is n is zero at any point, this doesn’t quite work. If I had all of the data I could just divide it into 5040 (seven days, 24 hours, over two).

(Of course, you might also want to weight the caulation with the number of passengers around in each hour…)

@briantist

Hmmm…interesting… is the number of passengers data openly available?

With the graph shown, I see that it shows the percentages…what is the unit amount that you calculated the percentages against and also, is the Oyster and WiFi data openly available?

Cheers.

@LondonTravel

I think it’s probably here somewhere

http://crowding.data.tfl.gov.uk/

@briantist

Thanks…will check it out!

1 Like

Hi @LondonTravel, is this desktop app available to download? Looks quite interesting! Thanks