GPS Conversion

Kevin Branigan

Bit of a repeat project but I focused on a short and simple route in Toronto called 125 Drewry.

I fetched the shape data from the official GTFS and plotted the 2 primary shapes (east and westbound below). You can basically ignore the axis labels - they are in meters east and north of a MTM meridian I think 17T. Also I shifted the one of them up by a bit to isolate them visually.

I took the realtime GPS feed from the TTC and fetched all gps updates for this route for a single day as plotted below. (includes dead mileage on the left)

This step is a bit of a leap but it visualizes the GPS coordinates translated from physical coordinates (in meters) to progress along the GTFS shapes length over time. Vertically stratified by individual vehicle to eliminate visual overlap.

And then I overlap to be able to visually compare with the GTFS schedule.

I fed all this data into a neural network to produce predictions of future performance to produce more accurate nextbus arrival times.

I did all this (and a lot more) to power the Circular Transit Schedule and originally TTC 7 Bathurst In A Storm.

TTC Service Summaries

Kevin Branigan

I've been downloading TTC service summaries for a while. I built a parser in JS if anyone is interested, there are so many exceptional situations. Here's the original pdfs anyway.

2008 - 03/30 - 06/22 - 08/31 - 11/23
2009 - 01/04 - 02/15 - 05/10 - 06/21 - 09/06 - 10/18 - 11/22
2010 - 01/03 - 03/28 - 05/09 - 06/20 - 09/05 - 10/10 - 11/21
2011 - 01/02 - 03/27 - 05/08 - 06/19 - 09/04 - 10/09
2012 - 01/08 - 02/12 - 03/25 - 05/06 - 06/17 - 07/29 - 09/02 - 10/07 - 11/18
2013 - 01/06 - 03/31 - 05/12 - 06/23 - 09/01 - 10/13 - 11/24
2014 - 01/05 - 03/30 - 05/11 - 06/22 - 07/20 - 08/31 - 10/12 - 11/23
2015 - 01/04 - 02/15 - 03/29 - 05/10 - 06/21 - 09/06 - 10/11 - 11/22
2016 - 01/03 - 02/14 - 03/27 - 05/08 - 06/19 - 07/31 - 09/04 - 10/09 - 11/20
2017 - 01/08 - 02/12 - 03/26 - 05/07 - 06/18 - 07/30 - 09/03 - 10/15 - 11/26
2018 - 01/07 - 02/18 - 04/01 - 05/13 - 06/24 - 09/02 - 10/07 - 11/18
2019 - 01/06 - 02/17 - 03/31 - 05/12 - 06/23 - 08/04 - 09/01 - 10/13 - 11/24
2020 - 01/05 - 02/16 - 03/29 - 06/21 - 10/11 - 11/22
2021 - 01/03 - 02/14 - 03/28 - 05/09 - 06/20 - 08/01 - 09/05 - 10/10 - 11/21
2022 - 01/02 - 02/13 - 03/27 - 05/08 - 06/19 - 07/31 - 09/04 - 11/20
2023 - 01/08 - 02/12 - 03/26 - 05/07 - 06/18 - 07/30 - 09/03 - 10/08 - 11/19
2024 - 01/07 - 02/18 - 03/31 - 05/12

Circular Transit Schedule

Kevin Branigan

So I've been archiving ttc bus/streetcar GPS data since 2015 because I knew there's tremendous potential but I'm still really struggling to make good use of it. Well actually I was collecting and using before 2015 as well but I wasn't storing it - I only have archive data to 2015. I used it back in 2011 as part of myttc.ca. In 2014 I used it for this queen street comparison and also in 2015 I used it for this more detailed storm performance comparison. Later in 2015 I used it as part of our first place win at Traffic Jam - you know, no big deal. Then in 2020 I was taking the streetcar across the city so I decided to compare that gps with the TTCs reported data.

So after finding that the vertical projection I created previously was a bit hard to read - especially regarding the opposing direction lines overlapping like an X, I decided to try and project the data on a circle. Also the vertical graph doesn't work when the bus route follows a different returning path, in this case it works a++. Branching routes of course are still not supported. I have a live version in webgl here, if you can't view it (it might take a few seconds to load the data) then here is a screenshot of what it should look like. You can speed up time and increase the amount of time displayed - I call this constricting and dilating because it reminds me of a persons eyeball when they do drugs. Not that I have any knowledge of such things. (I don't but I've seen hollywood movies)

You can view this animated webgl view here

If you can believe it, webgl is a fair bit of work and difficult to quickly iterate on - so you know, I did that think where instead of just doing a bit more work, I rewrote it all from scratch in D3. I'm an idiot but hey I did it for you. Also this version has the actual route in the middle to better indicate what you're looking at. Oh, also I fed the GPS data into a neutral network to predict the future performance of the vehicle, that's displayed as a dotted line.

Naturally, this is also a live animated performance.

I'm pretty done with this project for the moment, but if you have any ideas or suggestions or tips or money, send me an email and maybe I'll even respond