The Transit Freedom Calculator

by Willem Klumpenhouwer


How much freedom does your transit system give you?

There are many ways to measure the effacacy of a transit system: How many riders it has (ridership), how many passenger kilometres are travelled (mobility), and how many people live by a bus stop (access) are common ways to measure aspects of transit systems. While these certainly contribute to a successful transit system and are important metrics in and of themselves, they are all part of the most compelling underlying measure of a transit system: the freedom it provides.

The dictionary definition of freedom is the power or right to act, speak, or think as one wants without hindrance or restraint. When applied to transit, freedom is the ability to go and to choose where to go in a reasonable amount of time.

The trouble is, freedom is hard to quantify. People experience freedom differently, and what I consider a "reasonable amount of time" might not be reasonable to you. Since freedom is primarily a personal experience, putting a value or number to it is inherently problematic.

And yet, the freedom of a transit system is so important to its success and design that it deserves to be talked about quantitatively. That's why I've created the Transit Freedom Calculator, allowing people to compare areas of their city based on the freedom granted to them by transit using a simple letter grading system. I started with Calgary and will expand to more cities as data and opportunity allows.

Comparison of two travel area isochrones in Calgary

The Transit Freedom Calculator at first launch

Simply put, the app looks at how many destinations in a particular "bundle" you can reach within 30 minutes from a particular zone, and compares it with the same result from the rest of the city. More choice means a better grade.

While the resulting grades certainly pass an initial sanity check (in Calgary, better grades happen along rapid transit lines and in denser, mixed-use areas), there's plenty of room to grow when it comes to the approach. The science behind the methodology is continually evolving, but at its foundation it fosters conversation about what better transit should look like.

If you're interested, the rest of the artice walks through how I got to the initial results. If you'd like to leave a comment or report an issue with the application or if you just have a general question about it, you can submit that here.

Turning broad questions into methodology

In the introduction, I chose a definition of "transit freedom" that amounted to this: The ability to choose from a number of destinations accessible in a reasonable amount of time.

I chose a "reasonable amount of time" to be 30 minutes one way, with a nod to the famous Marchetti's Constant, which suggests that people will settle on an average commute time of one hour. A one-hour round trip for an activity seems to me like the upper limit (on average) that someone would be willing to spend travelling to or from a given activity.

Let's imagine a hypothetical person, who we will call "Robin". To simplify the approach and add consistency I assumed that Robin's freedom score, as with everyone elses, will be based on what they can access leaving their home (or other origin) at 9:00am on a weekday morning. Effectively, we want to know what places Robin can get to by 9:30 via transit (and walking).

To figure out how far someone can go in 30 minutes, we need to use isochrones. Isochrones are shapes that show what area is reachable in a given time (iso meaning "same" and chrone meaning "time"). This shape (and its area) is effectively the portion of the city available to Robin in our "reasonable" travel time of 30 minutes.

Let's take a look at two potential starting locations, shown in the map below:

Comparison of two travel area isochrones in Calgary

Two very different isochrones in Calgary

The map shows the total area reachable in 30 minutes for two differenet starting points marked by the star, one from the urban neighbourhood of Kensington, the other from the suburban community of Braeside. Both of the maps are shown at the same scale, revealing that the total area reachable from the two different starting points in the same amount of time is significantly different. This reflects the difference in the level of transit service in the two areas.

These isochrones were created using an open source tool called Open Trip Planner, which allows you to combine transit schedule data and road network information together to get these isochrone shapes.

Being able to reach a larger area of the city is only part of the equation. A large reach is only useful if it reaches places you want to go, and a small isochrone can still be quite useful if there's a rich number of possible destinations nearby.

This is where points of interest come in. Using Open Street Map (Wikpedia for maps), it's possible to extract the locations of destinations by category. For example, here's those same isochrones again, overlayed with the locations of pubs.

Comparison of two travel area isochrones in Calgary overlayed with pub locations

Which pub to visit?

Again, the downtown area has a much larger concentration of drinking establishments than the suburban community. This means that not only can the Robin who lives in Kensington cover a larger area, they also have a better selection of places to visit than the Robin who lives in Braeside.

Astute readers will point out that being able to reach a pub in 30 minutes at 9am on a weekday may not be everyone's priority, and they would certainly be correct. So how do we choose what destinations are important?

Creating "destination bundles"

Because we can't hope to capture everyone's individual destination choices, and because Open Street Map doesn't have every single destination coded, we need to build a set of locations that together form a representative sample of important destinations. This type of "destination bundling" does not have much supporting research, and is an area of study that will benefit from future work.

With that in mind, I created a set of six categories of destinations: "The Basics", which includes population, employment, and supermarkets; "Family" which includes schools, childcare, and playgrounds; "Health Care" which includes pharmacies, clinics/hospitals, and dentists; "Food & Drink" which includes pubs/bars and restaurants; "Recreation" which includes parks and sports fields; and "Arts & Culture" which includes theatres and cinemas.

While these categories may seem arbitrary (and to a large extent they are), they are based on two factors: Their relative abundance in Open Street Map (sports fields are better coded than fitness centres, for example), and my assumption about how frequent or regular their use would be. Some destinations are infrequent but regular (dentists), and some are frequently visited destinations (supermarkets), capturing aspects of choice that are both immediate and long term. By using data analytics and existing data sources such as travel surveys, I will continue to assess this set of destinations; for now they are postulates.

Assigning a final grade

We have determined where we can go in a reasonable amount of time (30 minutes) and identified the set of chosen destinations. Now it's time to put the two together. To do that, we need to divide up the city into zones to avoid having an infinity of scores to calculate for each possible location in the city. Thankfully, Calgary's regional transportation model zoning system is publicly available, and contains information on population and employment which Open Street Map does not. Using the centroids (middle) of these zones, we can compute an isocrhone, find the destinations available inside the isochrone, as well as the number of people and jobs (other points of interest). This gives us a total count of all of the various destination categories reachable within that isochrone.

Now comes the comparison with other zones in the city. What counts as an "A" versus a "C"? To calculate that, I found the percentile of a given category relative to the rest of the city. If Robin can reach more bars in 30 minutes on transit from Zone 1 than 90% of the rest of Calgary, then Zone 1 gets a score of 90/100. A perfect score means that no other place in the city can reach as many destinations of that type, while a score of zero means every other zone in the city does better. From there, scores were divided into letter grades as follows:

Score Range Letter Grade
90+ A+
80-90 A
60-80 B
40-60 C
20-40 D
0-20 F

An average for each category is taken to grade that category as a whole (e.g. the score for "Arts & Culture" is the average of the scores for "Theatres" and "Cinemas"), and the overall score is the avearage of all categories, with "The Basics" given twice the weight of the rest of the categories to reflect its importance.

That's how it works. With some open data and less than 200 lines of Python code we have a "grade" assigned for transit freedom in a city, allowing you to compare relative access to destinations throughout the city. This data is fed into the mapping application you see here. And that's it.

Some housekeeping: You can find the code used for the data analysis (independent of the web map application) on GitHub. If you are so inclined, you are free to use, share, dissect, and modify the code to your liking, though you will need to source your own data and set up your own instance of Open Trip Planner. All of the data used for Calgary is openly available, I've linked to sources throughout my description.

Final thoughts

The ultimate goal of this project is to look at transit through a data-driven lens and to encourage conversation about what a transit system is, and what it should be. Knowing more about what makes a transit system tick can allow us all to ask better questions and expect better planning.

This is my take. If you like what you see, don't hestiate to share. Let's keep talking.