Follow That Car! (Updated)

Updated November 30, 2010 at 4:00 pm:

  • NextBus links added
  • Information about the Open Data interface added

Original post below:

With the advent of an Open Data interface to vehicle tracking information, there are now two websites providing real-time information about TTC streetcar routes (and a few bus routes) in addition to the official, but not well publicised, NextBus site.

This post is intended as a repository for information on these applications.  If anyone develops a new one, please let me know, and I will update info here.

George Bell’s Site

George’s site began using historic tracking data for individual routes that was supplied to me by the TTC for my route analyses.  Originally, the site allowed you to play back an individual day’s operation on a route to watch how it actually behaved.  This function remains in place along with real time views of the data posted through the Open Data interface.

Currently, this includes all streetcar routes as well as the Bathurst and Dufferin buses.  By default, all routes are shown, but you can select an individual route.  There is no filtering in either the historic or real time views, and the odd vehicle can be found in the middle of Lake Ontario or the wilds of Caledon when its GPS gets confused.  As I write thi, bus 1401 appears to be moored just south of the international border in what would otherwise be Scarborough if that mighty burg had territorial ambitions.

There are many available controls and I leave it to readers to play with the site.  Note that it tends to be rather CPU and bandwidth heavy for those who might be contemplating access from a mobile device.

And, yes, the URL is really “borkbork.com” for fans of the Swedish Chef.

James Agnew’s “Where is my Streetcar

This site, developed with contributions from Mike Humphrey and Dennis Yip, consolidates mapping and arrival projection information from NextBus in one package.  You can pick specific stops as points of interest to see what service will arrive, but the site will remember your favourites and offer them as easy clicks to save on navigation.

The map displaying the route will adjust to display that part of the city where the route lies.  Agnew and Co. may only be “programmers, not artists”, but conveniences like this are what make a good app.

Visit their “About” page for background info.

NextBus

The official repository for TTC vehicle locations and predictions is NextBus.  This system, whose software shop is based in west downtown Toronto, provides the arrival predictions available by SMS message (using stop identifiers texted to a standard TTC number) and by web.

The TTC does not advertise the availability of vehicle predictions via web, and this is a really big shame because it is a very useful service that is not a big consumer of mobile bandwidth.

To access this function, you must visit nextbus.com and navigate through the list of locations down to the TTC.  If your browser supports cookies, NextBus will remember where you have been and will go directly to your recent query on your next visit.  Otherwise, bookmark the displays you will use commonly, and use any of them as a jumping off point for your next visit.

For example, I often transfer from the 501 to the 504 eastbound at Queen and Broadview.  Once I drilled down to the display for this service, I bookmarked it and can now quickly obtain next vehicle info.  The display refreshes, a nice touch for those cold winter nights when the King car is somewhere out of sight beyond the Don Bridge.

You can get from whatever display you are on to another direction, route and stop with a few clicks.

This site can also be used creatively to get a feel for the degree of bunching or location of gaps by jumping around a route and seeing what predictions look like at various locations.

Full route displays are available, but links to them are not provided.  Here is a link to the King car’s map.  A menu allows you to select multiple routes for display, handy for situations where service is provided by more than one route on the same street.

These two services — predictions and the maps — are not advertised by nor linked to by the TTC, but are easily the best part of the NextBus site.

While you’re there, you can watch the transit service in San Francisco, among other places.

Updated Nov 30, 2010:

A simplified interface to NextBus is available at their Webkit page.  There is also a barebones mobile interface.  The webkit page is better.

Toronto’s Open Data Initiative

The TTC’s Next Vehicle Arrival System data are available online from NextBus.  The data feeds include:

  • A list of supported transit agencies
  • A list of routes within an agency
  • A list of stops within a route
  • Predictions for service at one or more stops
  • A list of changes in vehicle locations

These interfaces are intended for application developers.

18 thoughts on “Follow That Car! (Updated)

  1. I’d add that http://www.nextbus.com/webkit/ is a great alternative interface for mobile web browsers that use the WebKit rendering engine (iPhone, Android devices, Blackberry OS 6). Looks great on a small screen and it will automatically determine your location (if supported by your phone) and give you information on the closest stops.

    Like

  2. Here is a list of web sites and apps that use the NextBus data I put together:

    http://www.nextbus.com/ iPhone Simple
    Official site. Shows minutes for next 3 vehicles, and info for routes that share the same stop.

    http://nextstreetcar.ca/
    Simple interface. Shows minutes and time for next 5 vehicles

    http://whereismystreetcar.appspot.com/ iPhone Simple
    Has three interfaces, all of which include a map with streetcar locations. Show minutes for next 3 or 5 vehicles (depending on interface). Some interfaces show if it is a CLRV or ALRV.

    TTC Navigator
    An iPhone app that supports Nextbus arrivals. Untested.

    http://doconnor.homeip.net/TransSee/
    Simple interface. Shows minutes and seconds and time for next 5 vehicles, including car number and run number. Can also show info for any set of stops on one page. (The author is biased towards this site)

    898882 (TXTTTC)
    SMS text interface. I assume it shows minutes for next 3 vehicles, and info for routes that share the same stop.

    By simple interface, I mean it uses basic HTML features suitable for even then oldest smart phones or most primitive web browsers. All sites have about the same ease of use.

    I have started collecting the GPS positions every 5 minutes for the 501 and 510 routes to try and identify which runs operate which branches. I’ll make the data available as soon as I’ve checked it to make sure it is usable.

    Like

  3. “Where is my Streetcar?”

    Absolutely love it! It’s amazing what things people who actually want to make the world a better place can accomplish. Bravo!

    I have two questions:

    1) I can’t choose the stop at Neville Park Westbound – I assume I should just use SilverBirch WB and subtract say 1 minute – any issues with that? What are the GPS points being used to track the cars – and how do they relate to the stops?

    2) How are the estimates made for EOL stops WB for cars currently travelling EB (and vice versa)? What assumptions are made about layover at the loops? Sometimes the cars barely stop there, and at others there are 4 cars piled up (2 in the loop, 2 on the street) – when they’re pulling out is anyone’s guess. That last scenario is usually late(ish) on Fri. and Sat. nights. I guess even TTC drivers don’t like to be alone on weekend nights!

    It’s illuminating (and sad) to see the bunching laid out in front of you. And then there’s the 501 – which this app turns from a giant PITA into a bit of a game! First time I tried this – using the stop at SilverBirchWB – my “next” car was 20 min away – at Connaught. Then 19 min away – at Connaught. Then 18 min away – at Connaught. Then – wonder of wonders – the Connaught car disappeared and my next car was 27 minutes away, with another one right behind at 28 minutes away, followed by 32 min, 42 min, 52 minutes… Gotta love the 501! At least now it’s funny. Thanks James!

    Steve: The GPS data come from the cars and give their actual location independent of any stops. One difference you will see in various treatments of the data is the filtering — cars that are enroute to or from service, or on a large off-route short turn (e.g. a King car turning via Broadview, Dundas, Church) may or may not show up. Obviously a car that is not on its route cannot participate in estimated arrival times at stops.

    For ends of the line such as stops westbound from Neville, I believe that NextBus has an estimated length of the layover an eastbound car will take based on averages of observations over time and, possibly, schedule info. Both of these may not be correct, but that’s the best they can do. Queen is a special case because of the way that operators change cars at Connaught, and the “schedule” is not as tightly linked with runs on the street as on other routes.

    I’m not sure why you can’t select the stop westbound at Neville — it is included on the stop list in NextBus (link here). Possibly the folks who built Where Is My Streetcar missed it — I will leave it to them to respond on this thread.

    Vanishing cars at Connaught are, of course, short turns. NextBus thinks everything is bound for Neville until it discovers otherwise, and therefore will make predictions about service east of Woodbine Loop than may not pan out if the nearest car is somewhere west of the carhouse. The data stream available to NextBus does not include info about the actual destination of a bus or streetcar for a few reasons. First, for streetcars, there is no digital info available to show what the destination sign is set to (the new streetcars will have digital signs). Even on buses, there is a limitation in the existing vehicle monitoring system’s data stream on the amount of data, and there isn’t room for more info. I understand from the NextBus folks that they are working on this type of capability for another transit system so that predictions will reflect where vehicles are actually going.

    Like

  4. Steve:

    I waited for a King car Westbound at Bathurst tonight and was pleasantly surprised to see next vehicle information in the shelter. It confirmed that the second car was only one minute behind the crowded first car (at 10:00 at night – there should not have been a gap and there should not be bunching.) I was able to wait for the second car (as my getting off point was before the first short turn point) and sat in comfort.

    I wondered if this was a duplication of the texting stop service recently introduced – and therefore one of them was a waste of money. However, after some thought, I decided that the TTC is unlikely to put displays at every stop, which retains the validity of the texting service for the ones in between.

    Steve: Yes, the next car displays in some shelters have the same info as you would get from the texting service. The difference is that you have to be in the shelter to see the display, whereas the SMS and web interfaces can be accessed anywhere.

    Like

  5. I’ll have an ipad/iphone version of my website up on itunes soon (just going through the approval process). I’ll follow up on this post when it is approved.

    Like

  6. Steve mentions something that the system needs to have fixed if it is to work properly – there has to be a way to place short turns into the equation. This is also important for the westbound 501 cars, where every second car is supposed to go to Long Branch, but never seems to actually make it (at least in my experience.) If the TTC is going to use short turns, then the nextbus/streetcar service should be able to compensate, otherwise it becomes useless.

    Like

  7. It would certainly be nice to be able to see short turns, but the NextBus information as it exists now has been really useful for me. To get to work, I generally either take the 506 west and then the subway south, or else walk down to Queen and take the 501. Being able to see where the gaps in service are takes a lot of the guesswork out of it and has saved me a lot of waiting and frustration. It’s not perfect, but it’s a huge step in the right direction and it’s one of my favourite uses for my smartphone.

    Like

  8. I’ve always preferred the NextBus display format. The vehicles use the simplest and most minimal icons that double as the direction-of-travel arrow. This makes picking out individual vehicles much easier. I wish they would place the arrows slightly off-centre though so that passing vehicles in opposite directions don’t obscure each other.

    The San Francisco MUNI map is one of the earliest created and better polished off as a result. It would make a big difference to readability on the Toronto map if each route had a different colour like the MUNI map. They also really need to shorten the vehicle flags to read only the 5xx number instead of the number and route name. The MUNI map is great with the single-letter route designators used there, especially when vehicles are close together.

    I saw a new status feature in the MUNI map which puts the text “on break” in the vehicle flag after the route letter. I assume this refers to a vehicle on a layover, as vehicles disappear from the map when they are not in service. The latter seems to depend on the operator changing the electronically-controlled rollsign properly – earlier in the life of the map you used to see a giant mass of overlapping icons milling about at Geneva Carhouse. Unfortunately we won’t be seeing extended features for a very long time on the TTC map because, as was mentioned here before, the antiquated CIS tracking system data stream has no more data-packet space for such information. Changing this situation will require more radio frequency channels and backwards-compatible equipment.

    Like

  9. Seems one enterprising Coffee shop owner is taking advantage of this info.

    The TTC could do worse than co-opt coffee shop proprietor Euan Mowat to its customer service team.

    He’s already helping promote transit, by way of a simple yet ingenious value-added perk for his customers at Grinder Coffee, on Gerrard St. E. near Jones Ave.

    The beverage-and-bagel joint Mowat opened about five months ago features a wall-mounted screen displaying real-time information on the arrival times of the next four to six 506 Carleton streetcars, which stop just outside the door on Gerrard.

    Like

  10. It’s great to see several independent websites/developers have been taking advantage of this information, even though the Netxbus prediction data has been publicly available for a fairly short time.

    My main gripe about NextBus (and a suggestion to independent developers) is that the “select route > select stop” presentation makes it hard to see all streetcars that serve a stop, regardless of route. The section of Queen St nearest me is served by both the 501 and the 502, and generally both serve my needs.

    The screen in the shop is a brilliant idea. All TTC needs to do is persuade every shop by a streetcar stop to copy this, only with the screen in the window. Given you can get a cheap PC for $400, it would probably cost the TTC less to buy the PC than to install the “proper” display.

    Like

  11. Hi Steve, thanks for posting this! We’ve gotten a bunch of cool suggestions and really positive feedback since.

    Anne, the missing Neville Park stop seems to be an oversight in NextBus’s data. It appears on their site, but the data API they provide omits it from the list of stops on the route. I’m going to send them a note to follow up.

    On top of short turn disappearances on the 501, I’ve noticed that everything west of Roncesvalles seems to “go dark” sometimes. At first I thought it was huge gaps in service or a problem with the site, but it seems to last hours at a time and even the official NextBus site shows no activity during these times.

    Like

  12. I’ve noticed NextBus ceases reporting vehicle information ~ 1230 AM, even on routes with night service. Does this occur by design or error?

    Vehicle arrival predictions are most valuable when service is less frequent – as it is overnight.

    Steve: I am looking at NextBus right now at 1:30 am and am getting predictions for the 501 and 504 services. The mapping function appears to be down.

    Meanwhile, over on borkbork and whereismystreetcar, vehicles are visible on the generated maps. This means that the location information is being collected and updated. One point to remember about night cars is that they have different route numbers (301 and 306), and so vanish from displays that select on the daytime numbers. This also means that, for example, the Queen night car does NOT show arrival predictions.

    I’m not sure what might be going on with the displays you are trying to use.

    Like

  13. I’ve collected the GPS locations every 5 minutes for routes 501 and 510 starting from Nov 26, 2010. I’ve been doing this to try and identify which runs normally operate on which branches, but could be used for a variety of analysis including what is done on this site.

    It is available in tab delimited files at http://doconnor.homeip.net/TransSee/data.html.

    I haven’t done much analysis, but experience has shown that the Queen streetcars tend to alternate between low and high run numbers and lower run numbers tend to go to Long Branch. I looked at Spadina, but I haven’t noticed a similar pattern.

    Like

  14. Nextbus maps appear to have vanished again.

    It doesn’t seem to map the 306 night streetcars. Which is a bit problematic, because virtually every streetcar … which they aren’t tracking. The Eastbound 506’s continue to depart High Park loop until 1 AM though, so between midnight and 2 AM you have this odd scenario of all the streetcars vanishing when they get to Main Station.

    Seems it would be simple to just to aggregate the 306/506 data together. And if it isn’t, I hate to see how they are going to deal with these complex multi-branch bus whose routing changes over the day.

    Steve: I suggest you visit the alternate sites that seem to have a better, er, track record at staying available. Mind you, they too seem to not consolidate the night car routes when you select a specific day route.

    Like

  15. Personally I like Darwin’s site best because it provides the most information, loads fastest and being able to look in on the F line in San Francisco doesn’t hurt either! Of course once TTC’s bus routes come online he’ll have to change ‘car’ to ‘vehicle’ or something like that.

    Like

  16. The information for the 7 Bathurst and 29 Dufferin routes, as well as other buses, has been removed from the Nextbus XML data.

    The feature I added to TransSee to allow users to know the distance of the next five buses from their stop no longer works.

    I emailed Nextbus and the TTC. They responded very promptly when the run numbers where removed and fixed the problem. They haven’t responded promptly this time.

    Like

Comments are closed.