Updated October 11, 2018
An updated set of charts has been added which show the evolution of headway values across the route by time of day, including an improved version of the “box and whisker” chart format. Scroll down to the end for this update.
Updated October 9, 2018
A substantial section has been added to this article with replies to many of the issues received in the comments and examples of revised and additional charts. Thanks to all who have commented on this.
I noticed that the data for the period from 6-7 am on 505 Dundas at Broadview Station has an unusually high value for headways below two minutes. On investigation I discovered that this was caused by garage trips that were inadvertently included in regular service. This only happens for buses that arrive via Danforth rather than via Broadview because of the geometry of the screenline in my model at Broadview/Danforth. This caused these trips to be counted twice: once on the way into service, and again when they left Broadview Station. Charts in the original article that were affected by this problem have been replaced.
An ongoing issue for transit riders is the question of service regularity. TTC Service Standards call for vehicles to leave terminals no more than one minute early and no more than five minutes late. That by itself provides a huge amount of variation within “acceptable” service, but there is no attempt to measure route behaviour once vehicles leave the terminals.
One unfortunate effect of Andy Byford’s term at the TTC was the creation of service metrics without necessarily making things better for riders.
Riders do not care if a bus or streetcar is “on time” on many routes, only that they show up regularly. That is the whole idea of “frequent service” – you don’t need a timetable, you just show up and travel without an excessive, unpredictable wait.
I have been wrestling with how to illustrate the problem for some time. As part of preparation for a series on suburban bus service, I wanted to create a measurement that would be fairly easy to understand and which would allow comparison from route to route and place to place.
This article presents the work-in-progress for suggestions to improve or add to the charts before I start publishing data for many routes.
Source of Data
As with all analyses published here, the source data are the TTC’s vehicle tracking records from the “CIS” (Communications and Information System) which, among other things, collects the GPS location of vehicles every 20 seconds. The transition to a replacement system “Vision” is underway, but all of the data I have used here comes from routes that were still operating under CIS at the time.
Along the length of routes, I have defined timepoints where the passage of vehicles is used to construct an “as operated” schedule from which headways at the timepoints and travel times between them can be calculated. [Chart updated Oct. 9/18]
From this chart it is quite clear that there is both a wide range in headway values leaving the terminal for 505 Dundas buses on the day shown, and that many buses leave on very short headways with pairs of vehicles travelling close together. The offsetting effect of course is that there are wide gaps between these groups.
A set of charts showing how this pattern evolves along the route is linked below. [Updated Oct. 9/18]
The situation varies from route to route with a common situation showing less spread in headways at the terminal, but quickly a pattern of bunches and gaps evolves as vehicles move along their route.
Consolidating the Data for Charts
The headway data for each timepoint has been summarized for all weekdays in a month by hour of the day and in two minute increments.
The first attempt I made at this used bar charts to show the distribution of headways at a point hour by hour. These are expressed as percentages of all trips, not as raw counts, so that values can be compared between locations and times.
For each hour, the red bar shows the proportion of headways that lie from zero to just under two minutes. Orange shows two to just under four minutes, and so forth through purple which shows trips at or above a 12 minute headway.
It is no surprise that the higher values dominate late at night, but through much of the day the lower values dominate. [Chart updated Oct. 9/18]
It does not take long after buses leave Broadview and Danforth for the headway distribution to shift. The chart below shows values at Dundas Street where the red bars (under two minutes) are the highest for most of the day. This indicates that a good deal of service is operating as closely-spaced pairs (or worse) of buses.
By the time service reaches Yonge, the pattern is even stronger.
Although these charts are colourful, they are also hard to read because separate charts are needed for each location and they are “busy” in that extracting specific information takes some study. This led me to an alternative way to display the data.
Given that the concern for this analysis is bunching (short headways), the data we really want to see is in the red bars (under two minutes). This leads to a chart consolidating the two-minute data for all locations along the route. Because of the number of timepoints in the analysis, this information has been broken into two charts for eastern and western sections of the route.
The pink line in the first chart shows that leaving Broadview Station, vehicles on short headways accounted for 15-20% of trips for much of the day. However, the proportion rises at Broadview/Dundas (red) and even moreso at Parliament (dark red), Jarvis (orange) and Church (light blue) with about one third of all trips on short headways. The values drop at Yonge (green) probably due to the combination of stop service time and the throttling effect of traffic signals, but rise again a short distance to the west at Bay (dark blue). [Danforth to Bay chart updated Oct. 9/18]
The situation continues on the western portion of the route.
For comparison, the average headways are shown below. Note that daytime values at Lansdowne, Roncesvalles and Bloor are higher than points further east probably due to short turning of buses to compensate for the construction at Lansdowne and the diversion via Dufferin and College. [Danforth to Bay chart updated Oct. 9/18]
Another way to look at headway reliability is the standard deviation of headway values. This value indicates the degree of spread in values, and the smaller the number, the more tightly clustered around the average (mean) the values are. Commonly, two thirds of values lie within one SD either way from the average.
Except for early in the day, the SD values lie in the area of five minutes, and this is consistent across the route. These values indicate that headways span roughly ten minutes for a substantial portion of trips, with an even wider range for all trips.
The spike in values at Spadina was caused by a single data point where a two-hour blockage and diversion meant that no vehicles crossed the screenline at Spadina for an extended period. The change in the SD value is much less than 120 minutes, but that one very large value can have an effect. Normally such data points would be filtered out, but I have left that one in to show the effect. [Danforth to Bay chart updated Oct. 9/18]
Looking at Another Route: 52 Lawrence West
By comparison, here are similar charts for the 52 Lawrence bus. This route is different from 505 Dundas in that all service does not operate over the entire route. As of April 2018, some buses only came as far east as Lawrence West Station, and at the western end service is split between the Airport and Westway branches.
West of Lawrence West Station, headways under two minutes dominate the chart for much of the day, and the situation becomes more pronounced by Keele Street where the 0-2 and 2-4 minute bars are the overwhelming majority.
Looking at data along the route, the two-minute values are lowest at the airport because scheduled headways here are so wide that bunching should be quite rare. That said, it is clear that some bunching does occur during the PM peak and early evening.
Leaving Yonge Street, the proportion of bunched service varies through the day with the worst values at the ends of the two peak periods. As on Dundas, the proportions grow as bunching becomes more severe along the route hitting a high point at Scarlett Road. This very high value probably reflects an operating practice where buses on the two branches make no attempt to maintain even headways near the point where the route splits. A related problem is the degree to which inbound service merges well (or not).
The values fall back at Martin Grove and Dixon because there is less scheduled service and therefore less opportunity for bunching. Even so, the degree of bunching here is not trivial ranging above 20% for most of the day.
Average headways show the service design along the route with the shortest scheduled headways between Lawrence West Station and Scarlett Road, another band for locations east of Lawrence West, still higher at Martin Grove, and higher still at the airport.
Standard deviation values on Lawrence are consistent for most locations, although they are noticeably higher on Dixon Road and at the airport.
The complete sets of charts for 52 Lawrence are linked here. Charts for 505 Dundas are at the end of the article following the updates.
Request for Comments
Please let me know what works and doesn’t work for you as a reader in looking at these charts, what might be done to improve them, and how these data can best be displayed for easy understanding.
Updated October 9, 2018
Many comments came in with suggestions on changes in the way that the headway data might be displayed to give a good sense of service quality. Because there is some overlap in the suggestions, and because it is preferable to include new illustrations in the main article, I have consolidated responses here rather than in the individual comments.
I have only included updated samples here for 505 Dundas as this gives the general feeling of what works and what does not.
Headway vs Waiting Time
Many people noted that riders experience waits, not headways, and that some way of translating what riders see into an index of some kind is needed. Alternatively, some explicit measurement of how long one is likely to have to wait at a given time of day and location.
This inevitably runs into the common analysis problem of averages versus a level of granularity that reveals something useful. For example, a route might have an average headway all day of five minutes, and hence an average wait time of 2.5 minutes. However, if buses come every 5-5-5-5-5-5 minutes the experience is quite different from that of 1-9-1-9-1-9. Both of these are half an hour’s service, but most riders will see two closely spaced buses and will have an average wait time of 4.5 minutes (half of the 9 minute gap). For vehicles running truly in pairs, 10-0-10-0-10-0, the average wait is 5 minutes.
Suppose this is a stop that serves 1 rider per minute, or 30 per half hour. With buses exactly the same time apart, all 30 of these riders will have a 2.5 minute average wait time for a total of 75 wait-minutes. In the second example, 3 riders will wait .5 minutes each (1.5 wait-minutes) while the other 27 will wait 4.5 minutes each (121.5 wait-minutes) for a total of 123 wait-minutes.In a situation where vehicles travel in pairs, 30 riders wait 5 minutes each for a total of 150 wait-minutes, or double what would be the case with the advertised service. Actual service on any route will lie somewhere in between and will vary from day to day.
There are caveats about this, of course, notably that some riders will wait for the second, presumably less-crowded, vehicle while others will pile onto the first thing that shows up. The riding experience will be a combination of a longer-than-expected wait plus crowding that could very well exceed the TTC’s Service Standards.
Those standards are based on averages and make no allowance for unevenness in crowding between buses. There is a compensating factor in that the service design load is lower than the crush load on the assumption that room must be left over for surges, most typically caused by uneven headways. This brings up major problems when politicians looking for “efficiency” say “but you can fit more people on the bus”. Yes, of course you can, but in the process more buses will be full and will turn away riders. Conversely, the cheapest way to create capacity is to run properly spaced service because there is a better chance that all of the space provided on vehicles will actually be used. Even on an overloaded route like the subway, it is no secret that regularly spaced service provides a better experience, relatively speaking, than situations where there is even a minor gap.
The TTC does not regularly publish vehicle loading counts, and on the occasions this does happen, data are averaged over periods such as the AM peak rather than being broken out within hours or percentiles to show the degree of variation a rider will experience. Moreover, loading counts hide would-be riders who simply could not get on vehicles, or who had a multi-vehicle wait to board.
One goal of my analysis is to reveal the degree to which actual operations differ from ideal, let alone the rather generous “standards” by which the TTC measures service quality. The TTC measurement is based on “on time performance” relative to schedules. This is an utterly bogus index for frequent service because the schedule is meaningless to riders. They just show up at a stop and expect a bus or streetcar to appear. That’s what “frequent service” means, and riders want regular spacing. If it is on time so much the better, but a six-minute “on time” window around the schedule allows “frequent” routes to run in bunches while hitting all of the management targets. The problem is compounded, as shown in the data already published here, because even a tolerably spaced service at the terminals (where the TTC measures reliability) quickly degrades into pairs (or worse) of vehicles only a few kilometres down the road.
Because bunching puts the lie to claims of good service, I concentrated on the proportion of service that operates on headways below two minutes. If this proportion is high (and sometimes it reaches 40%), then there will be corresponding set of much wider headways between these bunches of vehicles.
As for including a target value in the charts, this would only apply where all ranges of headways are shown, not just the below-2-minutes group. One challenge with this is that the scheduled headway is not the same at every time and location on a route. for example, in the transition between periods, a “wave” of midday headway works its way across a route from the terminal (or from wherever vehicles go out of service). The target headway may not be the same at 9 am as at 9:30 or at 10:00, and comparing actual headways to one value could be misleading. However, a comparison to the actual average headway could allow calculation of ranges either side of the average, whatever it happens to be. I will return to this in a future update.
A General Note About Percentages, Counts, Averages and Standard Deviations
The charts I have produced are based on percentage values, that is to say what proportion of the service operated within a specific range of headways. If raw counts of vehicles are used, the variation in counts from hour to hour and location to location brings on its own problems, notably that direct comparison between time periods, locations and routes is not possible because the number of vehicles for any one grouping varies. Conversely a statement such as “thirty percent of trips are at a two minute headway or less” is a consistent measure, and the sort of thing that could be converted into a service standard (e.g. a target upper bound on short headways).
Averages hide a lot, and this is the problem with much service quality reporting. Looking only at average headways, while ignoring actual headway patterns, masks the effect that most would-be riders see the gaps as they wait, and wait, for a vehicle to appear. Moreover, the relative crowding of vehicles (or even pass-ups on busy sections of a route) caused by gaps and bunches goes unreported. The “average rider” sees a bus that shows up less frequently than advertised and is overcrowded when it arrives. A closely-following bus can take on the load, but the rider still had the long wait for two or three buses to arrive in a pack.
However, something averages do show us is the changes in vehicles/hour (the inverse of the average headway) along a route. Specifically, if short turns are common, the average headway will rise beyond the point where many vehicles turn back. A combination of a high average headway and a high proportion of short headways is a recipe for disastrously bad service.
As for the Standard Deviations, this is a measure for those with an interest in the dispersion of data values. If the SD is small, then most of the observed headways are close to the average. This should also correspond to periods when the percentage of very short (or long) headways is low. However, as the SD rises, so does the spread in observed headways. On both of the sample routes used here, 505 Dundas and 52 Lawrence, much of the service operates with an SD roughly equal to the average indicating that over half of the vehicles operate at headways from zero to double the advertised value.
The SD is a useful value because it is independent of the actual value of the average. For example an SD of 3 minutes yields a six minute range of commonly observed values regardless of whether the scheduled headway is 5 or 15 minutes.
Some readers asked for a “box and whisker” chart, and I have included a sample below.
Each of these measures will have its adherents, and different measures reveal different things, although clearly some are more technically oriented than others.
Display by Location Rather Than by Time
Several of the charts in the initial article are organized with time along the x-axis and a separate chart line for each location. Many suggested that this arrangement be swapped so that the locations along a route are on the x-axis with a separate chart line for each hour of the day. I agree that this swap improves understanding of how headway reliability evolves and declines over the course of a route, but as others pointed out, this makes for a lot of lines (one per hour) on the chart.
One suggestion was to use line textures to clarify what was what, although this still can leave a very busy chart that takes careful study to understand. As an alternative, I have broken the chart into four time periods: am peak, midday, pm peak and evening. This reveals the way that headway reliability, measured as the proportion of trips at under 2 minutes, evolves quite clearly. The all-day pattern is easy to see by switching back and forth between the four chart pages.
The first chart shows the all day data organized by location east to west and by hour with different dash patterns for each period of the day. This is a messy chart, but things become much more obvious when it is broken apart in following examples.
For the AM peak, the lowest proportion of vehicles on close headways lies in the hour from 6-7 am, and it rises to about 35% by the end of the peak period. Note how the values are low at Broadview and Danforth, rise at Dundas and Broadview and then stay fairly consistent from there westward.
In the midday, there is almost no difference on an hour-by-hour basis including, consistently, a slight improvement westbound from Yonge (probably triggered by loading delays and traffic signal timing) that declines as service moves west to Bathurst.
The PM Peak continues the pattern.
In the evening, the highest values are for the hour from 7-8 pm (19:00) and these gradually fall, especially after 10 pm when the scheduled service is less frequent and with that the opportunities for bunching. Note, however, how the same pattern of increased bunching does occur late in the evening, but simply takes longer (Bathurst westward) to really take hold.
Another suggestion I received was to plot the data in 3D. This allows the information to be consolidated on a single image, but in the process creates a busier view where some of the detail is not as easy to make out.
In the first example, each slice of the chart represents a location from east to west (front to back) along the route with the times running across. I have tilted the whole display considerably so that the peaks and valleys are visible, but this brings up a problem with this type of chart. If values on front layers are high, they can obscure the back layers. This is a particular problem if service at the outer end of the line is less frequent and therefore the 2-minute percentages are lower.
Here is the same plot with locations along the x-axis and slices of time from front to back. Again there is a need to tilt the display so that the relatively lower late-night values are not hidden by daytime data. Even with the rotation I have used, this problem is quite evident below.
Clustered Column Charts of Headways by Hour
The charts which show all of the headway ranges (in two minute increments) stacked side by side for each hour at a single location have the disadvantage of showing only that location, and requiring that readers switch back and forth between busy charts to see how or if the data change from one to the other. The use of two minute ranges for the data was a tradeoff between granularity and space. Using one minute intervals doubles the width of each hour’s columns in the chart without revealing much more about where the peak value lies. Using three (or greater) minute ranges bring on the same problem with TTC’s own standards, namely that a wide grouping can mask behaviour at a level riders notice.
I will not include the clustered column charts in future articles.
Stacked Columns and Area Charts of Headways by Hour
In past analyses, I have looked at using stacked column charts, but that was short-lived as they tend to be visually busy with the pattern getting in the way of understanding. An area chart shows the same data with the only difference being that the vertical segments are smoothed together. (Note that because the values are percentages, they will always fill the chart to the 100% line regardless of how many actual vehicle headways contribute to the stats.)
One issue with this chart, as some have pointed out in other comments, is that there is a difference between an absolute range of headways as shown by a colour or a line, and a “good-better-best-horrible” scale that adapts to the target level of headways. For example, the dark blue ten-twelve minute band in the chart below is “very bad” territory when the scheduled service is every five minutes or better, but not quiet so bad late in the evening when, the scheduled service might be every 10 minutes.
The chart below shows the bands of headway data as percentages over time. A good deal of the headway values do not lie in the 4-6 minute range of headways scheduled over the day). The darker colours are easy to understand late at night when scheduled headways are wider.
This chart is “messy” in a few ways:
- What is “good” is not immediately obvious because there is no reference line for the target (scheduled) headway.
- The chart shows only one location requiring a reader to flip back and forth between multiple charts to see how values evolve along the route.
The same data plotted as a stacked area chart gets even messier. It’s a nice piece of abstract art, but the pattern gets in the way of understanding the details.
Finally, the raw counts of vehicles observed by hour show how this varies over the day whereas the charts above show the percentage of vehicles in each band. Note that this is the 19-day total.
I don’t like any of the charts above because, like the clustered column charts in the original article, they require multiple pages to display data over the length of a route, and the “artistic” nature of the charts gets in the way of understanding.
Box and Whisker Charts
This type of chart divides the data into four quartiles with emphasis on the two middle ones (corresponding to the percentiles from 25 to 75). This approach can hide information because it gives relatively little information about the spread of values, especially the outliers at the minima and maxima. In a month’s data, there is bound to be at least one bus running in an extremely short headway, and one on an extremely long one. This pulls the “whiskers” to the outer reaches of the chart without any indication of how common events in this range can be.
The charts below show the data for the four hours between 6 and 10 am in September, westbound on 505 Dundas, in Box and Whisker format. The y-axis maxima are set to 20 minutes so that the charts can be directly compared, but this clips instances where the maximum values lie above that level.
Each column displays the range of values in quartiles:
- The bottom “tail” shows the range of values from the minimum to the 25th percentile.
- The lower box shows the range of values from the 25th to the 50th percentile.
- The upper box shows the range of values from the 50th to the 75th percentile.
- The top “tail” shows the range of values from the 75th percentile to the maximum.
One big problem immediately pops out: the length of the tails. Over the course of a month’s data for one hour’s operation, there will always be at least one long gap. That’s pretty much par for the course on a transit route. That pushes the maxima out to high values that should not be read to imply an equal distribution of headways over the range that the tail covers. In fact, most of the values are closer to the bottom of that range, but this is masked by this type of chart. Similarly, there will always be at least one pair of buses running back-to-back and this will cause a uniform minimum value at or very close to zero. Again, this does not reveal the distribution of headways within the band.
The boxes show a range of headways that occurred 50% of the time while the tails show the other 50%. Ideally, the tails should be short, but generally speaking they are not.
As we progress hour by hour, the central boxes get wider indicating that half of the trips lie within a wider range of values (25th to 75th percentile). However, the top tails also grow off of the edge of the charts. By 9:00 every location has a maximum above the 20 minute line.
The chart below shows the 9:00 data with the y-axis adjusted so that the tops of each column are visible. Yes, this means that on at least one day, there was a gap of over 25 minutes that travelled the width of the route.
Here is the service chart for Tuesday, September 4, 2018 when these extreme values occurred. Note that there is almost no short-turning in an attempt to fill the gaps. The drop in the maximum value charted above was caused by one bus turning back from Parliament Street just before 9:30 am.
This is an example of how consolidating data can give misleading values when there are some outliers such as the situation shown below.
I can see a use for box-and-whisker format in some of the other headway and link time charts I produce, but at a more fine-grained level than an entire month’s data. I will explore this in a further update.
Chart Sets as PDFs
Here are complete sets of the charts used above in PDF format.
Updated October 11, 2018
This update presents a set of charts consolidating various requests into one format. There is an inevitable tradeoff here between complexity and content, and I hope that this finds a reasonable balance.
As I noted in the previous update, “box and whisker” charts run into problems in presenting headways in that for one month’s data, there will always be at least one pair of buses running together, and hence a minimum value at or close to zero. This doesn’t tell us anything. Similarly, there will usually be at least one bus running on a very wide headway thanks to a gap, and this will pull the maximum value well above the more typical headways riders encounter.
To correct for this, I have produced a modified version of the box and whisker format that shows how wide (or not) the outer region of the headway distributions are by including markers at the 10th and 90th percentile points. The chart below (click for a larger version) has the Y (time) axis capped at 60 minutes so that the full length of the “whiskers” is evident.
The next chart shows the same data, but with the Y axis capped at 20 minutes so that the important details are more obvious.
Each horizontal section of the chart presents one hour’s data. Within this each column shows data for individual screenlines along the route. The colour of the column segments indicates the range of values with the middle quartiles showing as wide boxes.
- Red: The lower 10th percentile of values lies within this band.
- Orange: The 10th-25th percentile lies within this band.
- Together these bands comprise the lower “tail” of the chart. One quarter of all headways observed within the hour at the location in the legend fall within this range.
- Yellow: The 2nd quartile, or the range of 25-50% of headways.
- Green: The 3rd quartile, or the range of 50-75% of headways.
- These two bands are the “box” of the chart and show the headways observed half of the time at each time and location.
- Blue: The 75th-90th percentile lies within this band.
- Purple: The upper 10th percentile, 90th-100th, lies within this band. These are the worst of the worst cases.
- These two bands comprise the upper “tail” and account for the final quarter of all observed headways.
This is the chart for the afternoon period from noon to 6:00 pm:
This is the chart for the evening period from 6:00 pm to midnight.
Several notes about these charts:
- A rider at a specific location and time will encounter a range of headways covered by the yellow and green sections of the chart 50% of the time. A further 30% of the time the range will extend up or down to the marker on the “whiskers”, and the remaining 10% of headways will lie in the outer range of the columns.
- Wait times would be half of the headway, on average, assuming would-be riders arrive at stops randomly during the period between buses.
- Note that in many cases, the yellow box has a higher value at Broadview & Danforth than further west on the route. especially during the evening period. This is caused by the tendency of buses to catch up to each other and run in pairs. the top of the green box also rises showing the offset in wider gaps that occurs when more vehicles run close together. The bottom of the yellow boxes routinely protrudes below the two minute line indicating that more than 25% of the trips are operating on short headways.
- The band of headways covered by the two middle quartiles (yellow and green) generally cover a range of 4-6 minutes. This is within the TTC’s “on time” service standard most of the day, but many riders do not receive the frequency of service the schedule implies that they should get.
- Far more riders are affected by the wider headways than the short ones because more riders accumulate during the gap and have longer waits. They are also more likely to suffer from the “where is my bus” problem because the next bus is more likely to be too far away to be seen.
As a specific example, for someone wishing to board westbound at Spadina in the hour between 3:00 and 4:00 pm (15:00 in the chart legend):
- Half of the buses will arrive on a headway between 1 and 6 minutes (yellow and green boxes).
- 15% of the time, the buses will be up to 11 minutes apart and a further 10% of the time they will be even more widely spaced (blue and purple lines above the boxes).
Waiting times will be half of the spacing between buses, assuming the rider can board the first one that shows up.
I believe that this format has consolidated most of the items various commentators flagged. I plan to use the following formats in upcoming articles:
- Average and Standard Deviation charts by location and time to show the degree to which these values vary on a route, if at all.
- Charts of the proportion of service running on a two minute headway or less.
- The consolidated charts of headway ranges by time and location.
Each of these displays different information and suits a different audience.
The set of six charts in the new format is in the PDF linked here:
Many thanks to all who left comments. This process has also triggered the generation of a revised set of travel time charts which will appear in an update to the September review of data for the King Pilot.