Dept. DF
bus timetables

plotting space & time: bus timetables

graphical bus timetable

Time runs horizontally, from 5:00 a.m. until 1:00 a.m. the next morning. The grid is divided by vertical lines every 10 minutes. Distance runs vertically, with the numbers on the left important stop IDs along the route (in this example, my house, my school, Palio coffee shop, and the downtown bus mall). Lines with negative slope represent inbound buses, and positive slopes the returning buses.

Plotting the space and time of bus schedules shows at a glance relationships that are not easily seen in precise numerical tables. For instance, notice below the inbound trips of the morning rush hour, visually signified by a cluster of lines;

graphical bus timetable

In the evening, notice that around 2:30 both the inbound and outbound trips become more frequent, with a cluster of three departures near 5:00;

graphical bus timetable

variations

Initially, I plotted the inbound & outbound trips separately. In most cases, this halves the information density, as most routes simply follow the same path in both directions. Together, things become a bit cluttered, although this might be resolved by the incorporation of colour;

graphical bus timetable

Common visual ability to sign the slope of a line makes this more of an aesthetic choice than a practical one. However, if the inbound and outbound routes are geographically dissimilar (opposite semicircles, say), then plotting them together is extremely misleading–the ordinate labels (stop IDs) would need to be explicitly matched with inbound/outbound travel.

limitations

The charts are generated directly from Trimet’s schedule data, which gives times down to the second. Limitations in reading the data are of the human eye and printer resolution. A table printed landscape on an A4 page from 5:00 a.m. until 8:00 p.m. gives just over 18 mm per hour, or 3 mm every ten minutes. This is certainly printable (3 mm is about 9 points), and the intersections of routes and the horizontal rules can be easily read off to 5 minutes–about the same uncertainty as scheduled bus arrival.

#For instance, the longest inbound shape of the 19 Woodstock is 40772 ft, and the shortest is 37329 ft, 92% the size of the longest. The horizontal rules are determined by the most-common shape, which in this case is also the longest.

These timetables gloss over subtle differences in the routes.# The 19 Woodstock, for instance, sometimes meanders through suburban Eastmoreland or loops over to a large apartment complex. These route deviations change the scaling of some trips on the timetable, which shifts stops vertically. That is, some trips reach a stop designated with a horizontal rule before the intersection of the trip line and stop, even if the bus is exactly on schedule. While an ugly theoretical blemish, in reality the lengths of different shapes of the same route do not differ by more than about 10% typically. At the risk of confusion, we might mark trips accurately (individually) rather than having a single horizontal rule for designated stops;

small ticks for stops

Although this leads to ugly ambiguity in some cases, as you can see at the bottom. Another alternative would be to create a notch of empty space for designated stops, though this may make it harder to determine the arrival time;

notches for stops

technical implementation

Portland’s excellent public transit agency, Trimet, developed with Google the Google Transit Feed Specification to get their services incorporated onto Google Maps (searching for driving directions brings up a “take the bus” option). The specification is a simple collection of comma delimited text files with the times, routes, shapes, and stops (latitude & longitude!) of the bus system. This data is Promethean in a sense, as careful study reveals some mysteries of the bus system.

Each route can have multiple shapes, which are the actual consecutive listing of the stops and their geographic coördinates. Trips run over a given shape, and the scheduled arrival time at a stop is given, along with that trip’s total distance up to that stop.

The timetables are PostScript generated from Trimet’s data via a Ruby script. For a given route, the script selects shapes which contain all of the required stops. This is tricky, as some trips skip particular stops and late-night trips often begin at stops the day trips never visit. Each shape is scaled by its distance between the first and last designated stops to ensure uniform vertical height, and all of the trips of that shape are plotted. Horizontal rules are drawn for the user-specified stops based on the distances given in the most common shape.

concluding remarks

#page 108 of Tufte’s Envisioning Information (1990). Graphic Press, Cheshire, CT.

As most Americans are familiar with the concept of a graph relating two variables, it is curious that visual timetables are not more common in bus and train terminals. The standard seems to be columns of numbers given for just a handful of major stops. Edward Tufte notes this in his discussion of transportation timetables.#

The visual timetable, on the other hand, makes accessible larger patterns. In fact, because all of the vertexes of the trip lines are held to several decimal places in the vector file, one could precisely reconstruct all the times for any stop by printing out a very large copy of the pdf timetable. This is left as an exercise to the reader.