Tag Archives: computers

Greater Toronto Area transit map

Many years ago, when Google first released Google Maps and revolutionized online mapping from the stagnant MapQuest era, I put together a few quick demos showing the Vancouver and Toronto transit maps. I’ve made a few updates over the years since then, but not much more.  The Vancouver one is still quite popular – more popular than TransLink’s own map, to be honest – but other web gurus made better Toronto maps, such as the excellent one by Ian Stevens.
I’ve noticed that Google has revamped the mapping APIs and is preparing to eliminate version 2.0. The whole treatment of online mapping is changing rapidly, as the mobile market takes off. I was thinking of just scrapping the Toronto map since it’s not well-used – but then I thought a little further. What if I could make a proper map of the Greater Toronto Area?  Ian’s map doesn’t cover that – in fact, since there isn’t even a good print product covering the full area. Perhaps I could make something useful for the “regional traveller” using GO, and also help mobile users who have trouble with Ian’s site.
I set to work, borrowing liberally from others. It’s a patchwork by nature, since each agency has its own colour and line conventions, but hopefully still useful. When Ian made his map, taking a bitmap image and turning it into tiles was a bleeding-edge endeavour and required painstaking effort – but the tools have improved a lot. Even still, a bitmap this size (35,000 pixels square) takes some horsepower. I didn’t have the energy to do everything Ian did (like removing the background); his map will still probably work better for most TTC riders. I also couldn’t figure out what map projection Oakville Transit used, and couldn’t get it to line up nicely with the other data.
I’ll probably do a few more revisions on this in the next few months – an adjustable opacity slider would be nice, a legend for each operator, and higher zoom levels. But I thought I’d release a beta version and see if anyone likes it, and see how expensive the bandwidth is.
Version 3 of my map is now up (and version 2 is still around for anyone who wants it). New in this version:

  • Local transit operator maps
  • More mobile friendly: full-screen view by default, location-aware (uses GPS to detect your current location, if available)
  • May seem slower, unless you have a new browser, like Google Chrome or Firefox 4
  • Graphics updates: labels cleaner, interchange stations cleaner, labels always visible instead of showing on hover (for touchscreen users)
  • Search tries to find a transit station first, otherwise tries other non-transit locations
  • No legend… yet
  • Added “Get directions to here” link to each station
  • API version 3
  • Fixes: added Lincolnville station, fixed broken links

Google Map updates

Several years ago, I put together some Google Maps for the Vancouver and Toronto transit systems. In light of the expected opening of the Canada Line in Vancouver on August 17th, I took a shot at updating the maps.
In the interim, though, Google has made some big advances in its handling of transit. They have a full database of rapid transit stops in Toronto (GO and TTC subway), and a layer that shows the TTC subway lines as well. York Region has provided Google with full local bus data, including schedules, and Google Maps does a fairly nice job of showing that information. That said, the visuals for the transit system aren’t the most attractive, the lines showing the GO rail network are hard to see, and other major transit facilities don’t jump out at the viewer (like the York VIVA BRT Light system or the Spadina streetcar). And in Vancouver, Google still has zero data.
So, my maps still serve a purpose. The changes in this edition are:

Greater Toronto Hamilton Area

  • Added York VIVA Blue and Purple lines
  • Changed Toronto colour scheme to colour code by operator (TTC, GO, VIVA) rather than by line. Changed line thickness to represent “all-day” vs. “peak only” service
  • Added links to TTC and GO station websites
  • The debate over “what to include on the map” is growing in my mind. Should St. Clair and Spadina be in, since they have partial segregation from traffic? Should the north half of VIVA Blue really be in, when it has 15 minute frequencies in the peak hour and operates in mixed traffic?

Metro Vancouver

  • Removed 98 B-Line and moved Canada Line to the “present day” map. Updated Canada Line alignment, added numbers of connecting buses.
  • Changed colours to match latest TransLink map, and changed line thickness to represent “all-day” vs. “peak only” service

Codebase

  • Moved to more modern Google APIs now that they exist (e.g., GMarkerManager)
  • Removed labels from map – the Toronto map in particular was far to cluttered, and the speed penalty for showing the labels was too high. They’re still there, but only if you move the mouse over a station icon.

Transportation Research Board template for LaTeX

Last summer, I submitted my first paper to the Transportation Research Board (TRB) conference (ultimately accepted, and presented in January 2009). They have recently started accepting papers in PDF form instead of requiring a Word file—and this meant that I could write my paper in LaTeX, my preferred document processing system.
However, TRB doesn’t provide any LaTeX templates, so I took a shot at rolling my own based on the TRB Style Manual. It’s very primitive in its present state, but it’ll handle the page layout, headings, captions, fonts, and bibliography style.
Unfortunately, they still require a Word document if you plan to publish in their journal, Transportation Research Record. I’m submitting my paper to a different journal for publication, and that journal accepts LaTeX submissions. But if the ultimate destination for your paper doesn’t accept LaTeX or PDFs, take care.

For the record, a little discussion of my adventures in creating all of this. Most of it is fairly straightforward stuff—find the right packages to adjust margins, heading styles, fonts and so on. (Largely, this makes the document more ugly. The TRB journal format is quite unattractive, Word-like and dense, if you ask me.)
The one tricky part was the bibliography style. The recommended TRB citation style is different from any of the built-in LaTeX and BibTeX styles, and I wanted to replicate it correctly. Thankfully, I found the excellent custom-bib program (a.k.a. makebst), which walks through a series of questions to produce a tailor-made Bibliography Style file (bst). I still had to make a few final edits to the resulting bst file (to adjust the volume/number citation style, and technical reports) but thankfully didn’t need to learn much about the cryptic and obscure language they use.
At any rate, it was a surprisingly painless procedure, requiring under a day to get everything working. Now hopefully some other transportation researchers will find this useful and reuse the template.

Thesis: Synthesizing Agents and Relationships for Land Use / Transportation Modelling

Figure from thesis
I finished my M.A.Sc. degree at the University of Toronto in August. In a past post, I discussed some of the coursework that made up the first year of the degree, but I haven’t really discussed the core research here before. I did win an award for some interim results presented at a local conference, but I wanted to hold back on too much public detail until some of my results were ready for publication. My paper submission to the Transportation Research Board was accepted this week, and my thesis will be formally published by the university next month, so there’s no need to hold back any further.
My research is a small piece of a larger research effort: trying to build integrated land use / transportation models that go beyond traditional transportation models. In classic four-stage models for forecasting travel demand, both the transportation network and the shape of the city (land use) is treated as an input to the model, and the travel patterns that would emerge from such a city are estimated. Typically, the goal is to see how changes to the transportation network would impact travel patterns – for example, building a new freeway or subway route. In reality, however, it is not valid to hold land use constant while changing the transportation network – land use reacts to the presence of transportation infrastructure.
Models of this type have been under development for a long time, and my thesis is part of the ILUTE modelling effort at the University of Toronto. The figure below shows the ILUTE model structure, with land development, household location choice and automobile ownership as integral components of the model, not inputs to the model.
ILUTE model structure
My particular contribution is in the population synthesis part of the model, where I developed a faster and more capable method for synthesizing person, family, household and dwelling agents/objects; and a more robust method for creating the initial relationships between these agents.

  • Presentation: aimed at a fairly general audience (new civil engineering students), but perhaps a little cryptic without the narration.
    [HTML | Powerpoint]
  • Thesis: all of the gory details.
    [HTML | PDF]

The Science Commons

I’ve been writing a short report on open source transportation software, and I ran across an interesting website along the way. Apparently, the Creative Commons people are trying to kickstart a new Science Commons for factual information. Unlike creative content, facts are not covered by copyright protection, but collections of facts (i.e., databases) fall into a grey area and are generally covered.
If you’re intrigued, start with this brief article on the subject. I think it motivates the idea of a Science Commons quite well, particularly the need for machine-readable metadata and broad searchable databases. Back when I worked in computer science, I was really spoiled by the excellent Citeseer article database – there’s no equivalent for transportation/urban planning. While I’m still in university I have good access to databases, but some journals still don’t even have the table of contents online, let alone the articles themselves. (I’m talking about you, Transportation Research Record.)
I’m not naïve enough to think that “data wants to be free!” There are clearly many datasets that will not be collected or maintained without commercial incentives. But there is also a lot of data that is only locked up due to historical quirks in the publishing industry, or political trends in the academic sector to prefer commercialisation and patents to the tradition of open science. Bring on the Neurocommons… but dear god, please find a better name for it.

Virtual City

The Globe and Mail had a story today about a very cool website for techie urbanists like me: Virtual City. They’ve digitized streetscapes for a ton of Toronto and Montreal cities, and you can use Google Maps to bring up photos of the street. Great idea, and reasonably well implemented. It clearly still needs a bit of work, but I’m definitely going to start using it now! Give it a shot.
I’m not sure what the business plan is. I suppose it’s useful for finding retail: “there was some funky clothing shop on Queen just west of Spadina… what was it called again?”

GO Transit


I’ve been reading Steve Munro‘s blog lately, as he discusses the nitty-gritty details of transit planning in Toronto. He brought up an interesting point regarding the extension of the Spadina subway line to York University: there’s already a GO transit line that goes direct from York University to downtown, and GO is a better way of feeding people into the downtown than the subway line. (The Yonge line is already at capacity now.)
So what about GO? I’ve only used it once or twice, and I really didn’t know much about it. I didn’t even have a picture of the network. So, I added the routes to my Toronto transit map. It was an interesting exercise – I’d never thought of Dundas West or Leslie subway stations as interchanges, but they are. You get a different view of the connectivity of the city this way – Agincourt is surprisingly close to downtown (a 27 minutes ride), the Danforth station near my parents’ house is only 11 minutes from downtown, and York University is only 22 minutes from downtown. Living in downtown without a car, there are routes to take you a huge distance from Toronto: Bradford, Milton, Hamilton, and Oshawa are all in reach. If you combined GO with a bicycle, you could get to Lake Simcoe or tour the rural areas around Toronto.
The problem, however, lies in the frequency and the hours of operation. Most of those trains only serve one-way peak hour travel, so you can’t use them for a daytrip from downtown to the hinterlands. And they run so infrequently that you would rarely choose them as an alternative to the subway. As Steve Munro suggests, we really need upgraded service on the GO lines. I’d love to see a service like Lausanne offered, with trains in every direction at reasonable frequencies.
I think it’s interesting that GO is so absent from the lives of Toronto residents. As a local, I was completely oblivious to that network – mostly, I guess, because it was nearly useless to me with its present service levels. It doesn’t even show up on TTC maps, which further marginalizes it. My only awareness of GO was where the tracks disrupted my bike ride, like the dip under the tracks on Woodbine. And yet, it could be a valuable part of carfree life in the city.

Toronto Transit Map

Toronto Transit Map
Last August, I put together a transit map for Vancouver using the new Google Maps API. I recently went through and updated all the code, switching it over to XML for the geographic data. Using that backend, I’ve now put together a Toronto transit map. So far, I’ve only got the TTC on there – GO bus and train routes would also be valuable, of course.
It was an interesting exercise to put together. I now understand why I never use the northern part of the Spadina line: north of St. Clair West, it runs directly under the Allen Expressway, which kills the life around those stations. When transit and freeways compete, freeways usually win. I also now see the folly of the Sheppard line: I think it’s too close to the 401 to compete. Additionally, since it’s north of the 401, it’ll never be able to capture much ridership from anyone living south of the 16-lane freeway, even though there’s probably more potential for dense development on the south side, closer to downtown. It’s interesting to compare the station density in Toronto and Vancouver: the Toronto stops are much, much closer together than the Vancouver stops. The new Sheppard line is similar to Vancouver station spacing, though.
And incidentally, I’ve also updated the Vancouver transit map to include the two routes that’ll be finished in 2010: the Canada Line (a.k.a. RAV / Richmond-Airport-Vancouver) that will replace the 98 B-Line and the Evergreen Line that will replace the 97 B-Line.
I’d like to allow others to add a transit layer to maps on their web pages. When I last used Housing Maps to view CraigsList listings on google maps, I found myself desperately wanting a transit overlay. I think it’d be possible to write a Mozilla addon button that just added a transit map to whatever webpage you’re viewing… I’ve just got to figure out how to do it.

Bike & compute

I’ve been looking around for a new set of panniers to replace my current beat-up pair. (For the uninitiated, panniers or “saddlebags” are bags that strap to the rack on the back of a bike.) Since I bike everywhere, having good bags is critical – I need to move around groceries, papers, and my computer from A to B, and I need to do it during typical Vancouver drizzles and downpours. I was a backpack man for a long time, but I needed to carry more goods, and panniers were fantastic for avoiding that sweaty back.
My biggest problem has been the computer, which is too big for my current panniers, and really needs a waterproof container. I have a Targus computer backpack that keeps the rain out, but it’s heavy and sweaty on my back. Enter Ortlieb – beautiful German-designed panniers for typical commuter purposes, although at steep prices. I finally bit the bullet, though, and picked up a $170 office-bag for the computer. It’s a real marvel of design: a roll-up top like kayaking bags for some serious waterproofing; a nice shoulder strap for carrying off-bike; and not too much of that bike-geek look. They’ve got some other good bags too, including one designed for shopping and two backpack designs.
I do own a lot of bags now. I guess it’s part of being car-free – I don’t take my own 3300L storage space around with me everywhere, so I need a few 50L bags for different purposes. (That figure is for a Saturn, with 2850L passenger volume and 450L trunk volume.)