For the last few months I’ve been scraping SORTA’s real-time GTFS data for vehicle positions. I don’t really have any plans for what to do with all of it, but it’s easy for me to collect and I figure someone else may have a use for it somewhere down the road. This could eventually be a very interesting dataset for looking at e.g. changes in on-time performance, traffic congestion, bunching, etc.

Essentially, for each vehicle in operation at a given moment, I’ve been storing its:

vehicle_id: vehicle ID given by the API

trip_id: trip_id given by the API. I believe this corresponds to the trip_id in the GTFS package for the corresponding period.

report_time: the timestamp field, per vehicle, given by the API. This is stored as Greenwich time, without a time zone, so you need to subtract a few hours to get to local time.

location: I’ve been storing everything in a PostGIS database, and the location datatype in this case is geometry(POINT,4326). Postres dumps this as a hexadecimal string.

The API updates all vehicle locations every 30 seconds and I’ve been requesting updates every 25 seconds and ignoring duplicates, so I should have all of the data on vehicle positions that have been made publicly available. I’ve tried to keep my script running steadily, but there have inevitably been a few interruptions as the postgresql server has been restarted, etc, so there may be some big gaps. Where there is any data, it should be complete; It just may skip out for a day or two. The earliest date I have is 2017-05-16 17:59:36.

Anyway, here is the script I’ve been using along with ancillary files:

It’s been requested that I post offer some fresh thoughts on the issue of the Cincinnati streetcar project, in light of the two years I’ve spent so far in Toronto, a city with, indeed, many streetcars of it’s own. It’s a fun writing prompt, so here goes!

First, to understand the context, you’ll need to be familiar with my earlier remarks on the streetcar project, then underway. I did a whole series of posts outlining in detail the various weaknesses and infirmities of a project, which I think by accounts on either side had been too much discussed, and by my account too little understood. The series is some of my better writing on this blog and for anyone with an interest in the topic I would of course recommend that you read it in full.

I’ll try to summarize for the sake of rhetorical clarity though: my position on the Cincinnati streetcar project is basically that both advocates for the project and it’s detractors were pretty seriously misguided. Advocates seem generally to have conceived of the project in isolation from the rest of the transit system. It’s goal for them was primarily one of economic development in the city core, with actual transportation as a secondary or even tertiary goal. These priorities resulted in a project that serves poorly as actual transportation and which integrates very poorly with regional bus services, most of which overlap the streetcar route in some way, and which constitute the overwhelming bulk of actual transit in the region. The project opponents for their part acted like belligerent children and failed to offer any serious critique of the project. They also seriously misrepresented the project costs and pretended to be fiscal conservatives while ignoring concurrent highway expansion projects with costs orders of magnitude higher and even more dubious benefits. I do not believe that “expanding the system” will help anything because the streetcar should not be conceived of as a parallel transit “system”. That whole conception is deeply flawed and will lead to more mistakes.

Now having written that, from memory, I guess one thing that should be clear is that my opinion hasn’t changed much. But the question was: How has my experience in Toronto informed that? What is the streetcar experience in Toronto?

Toronto’s transit system (the TTC or Toronto Transit Commission) is indeed a “system” in a meaningful sense. Paying the standard fare entitles one to travel across the whole network on any number of “modes” (bus, express bus, streetcar, streetcar in designated ROW, subway, LRT) operated by the TTC. The routes form a mostly non-overlapping rectilinear grid which spans the entire city.

For most trips it’s necessary to change vehicles and often to change between “modes” in the process. This is generally easy because the TTC makes it pretty straightforward to transfer, especially at subway stations where transfers happen within a fare-paid-zone. High frequency service on most lines minimizes waits for connecting services. For a deeper discussion of this network structure, and a contrast with a network more like Cincinnati’s, I recommend A very Public Solution, by Paul Mees.

Anyway, most major streets in Toronto are served by some kind of transit services and some of these happen to still be streetcars. In fact, I believe TTC has perhaps the largest streetcar operation in North America at least in terms of daily ridership on those routes. These streetcars however are a part of a large, integrated network, and which part of that network they happen to be seems as much a product of history as of planning. The actual vehicles range from long low-floor modern vehicles to single and articulated high-floor models from I think the 60’s or 70’s. Streetcars operate both within designated rights of way, as on Spadina or St. Clair avenues, or mixed with other street traffic as is the case pretty much everywhere else. Often something on or near the tracks will be under construction and the streetcars will be replaced for days or weeks with single or articulated buses with little effective change in service levels. The operation of these routes with buses is a common occurrence and not one that I’ve ever really heard anyone remark on.

Streets with streetcars do not generally have better service, nor worse service for that matter, at least as far as I can tell. For example, I live near Dufferin Street, which has articulated buses running as often as every three minutes during peak service. Another nearby transit street is Queen Street, which is usually served by streetcars along it’s entire length, though again, sometimes these are replaced by buses for some or all of the route. Queen street is narrow and extremely congested during the day, meaning that service on this street is generally much slower than that on Dufferin and much more prone to bunching. It’s not terribly uncommon to see three or even four streetcars one after another. The peak frequency is pretty similar, so the level of service on these streets is really the result of local traffic congestion more than the type of vehicle being operated. One way that the TTC is looking at dealing with such congestion is by working with the City to remove non-local car traffic from streets with transit services that are currently at or beyond capacity, as is now being considered in the King Street Pilot Study.

All of this, all of my experience here so far reinforces the idea that the quality of a transit service is not about the kind of vehicle being operated, but about the way it’s operated, whether it is mixed with traffic, scheduled with adequate headways, given reasonable connections with other services, etc. The only instance where the vehicle as such really matters is where it’s capacity varies. Articulated vehicles (streetcars or buses) carry more people than single vehicles, and require fewer drivers per passenger, saving on operating costs if the vehicles are reasonably well utilized. Perhaps I should also add that the number and width of doors can also matter, though this would make little difference in Cincinnati given current passenger volumes on most lines. Boarding speed is another element of overall line capacity though, so this is really just another dimension of that. And again, line capacity is not an issue that Cincinnati is facing in any real way.

These are the sorts of details by which a transit project should be considered and described. That the Cincinnati streetcar continues to be discussed in very different terms indicates to me that it’s primary purpose is not to effect the efficient movement of people through or within the urban core. It’s primary purpose, so far as I can tell is to signal that Cincinnati is “with it”, that OTR is a cool neighborhood, and that it’s safe to invest here because the neighborhood is now more closely aligned to the trends of other places which have seen dramatic recent increases in property values. If that was the goal, then we should be discussing whether a streetcar is the most efficient means of accomplishing it. Perhaps it is; I’m not a real-estate developer and such questions are beyond my purview.

What about it’s popular success such as it is? To the extent that the streetcar does or does not meet ridership projections or expectations, I think we would need to consider how such projections are to be made. Surely different models exist for projecting demand for transit services and demand for e.g. a ride at an amusement park or a brand of shampoo. One model would probably look at landuse, density, travel demand and the competitiveness of alternative modes etc., and another may consider popular sentiment, advertising, product placement, etc. I would leave the reader to wonder which model is more appropriate here, and if there is popular demand, to the alignment of which variables this can most rightly be attributed.

And what if everyone had an even probability of visiting some other fellow cyclist who lived between 3 and 8 kilometers away from them? This would be a beautiful and strange world. Here is what the traffic might look like in that world, assuming there were no effects of congestion. Thicker lines have more bikes:

Line thickness is scaled to the log of a measure of betweenness, based on optimal paths for bicycles, as defined according to current OSM data and OSRM‘s default bicycle routing profile. ‘People’ were located randomly inside their 2010 home census block and routes were calculated between random pairs of people where the straight-line distance between them was between 3 and 8 kilometers. The distance limits are to simulate reasonable cycling trips and work against MAUP effects.

This is the first step in a project to develop mode-specific street hierarchies, which can be used in transport maps where auto-based classification schemes are undesireable or unavailable. In the coming days, I’ll work on a better weighting scheme (than population density) and look at other modes and cities. I’ll be working the results into a poster for NACIS 2017, showing the different hierarchical classifications that result for cycling, walking, and driving modes, hopefully across three cities with widely different development patterns (Cincinnati, Toronto, …?)

In case anyone is interested, I’ve begun storing data from SORTA’s GTFS-realtime feed. I started the script today and I see no reason to stop it unless I start running out of space on my server. I’ve got GTFS trip_id’s, vehicle_id’s, locations and timestamps for every vehicle location update from here until infinity.

Let me know in the comments if you happen to be interested and I’ll find a way to share the data!

It’s not often I make recommendations about TV shows, but when I do they seem to be Australian. To anyone who’s enjoyed this blog, I might recommend “Dreamland”, and season 1, episode 3 specifically. It’s on Netflix, in Canada at least.

The show is a sitcom that follows an inept planning/development office as hey try to get anything done. Good stuff.

I think I remember the show being marketed as something else in Australia, perhaps “Utopia” or something like that (in case you want to try torrenting).