TTC Stations (2023 Update)

Commuting time by minutes + distance:
Biking or Walking

an Introductory JavaScript and jQuery learning project by Kitty Yiu in 2016

Optimal to view on desktop or tablet

Download project .zip file on GitHub



Frequently there are subway problems at TTC stations delaying regular commutes.
So a passenger decide to either bike or walk going to a destination.


Beginner Level

Only "Line 4 Sheppard-Yonge"

Assuming these SIMPLE conditions

  • Only Line 4 Sheppard-Yonge!
  • Only Biking as mode of commute
  • Always begin at the first station. Eg. It is Sheppard for Line 4
  • Only One-way trip (A to B), no backtracking
  • No transfer stations
  • For simplicity: Time duration is express in minutes and as whole numbers that’s no decimals.
    No need to convert time to include hours, or seconds.

Intermediate Level

Assuming conditions

  • Same conditions set in the Beginner-level
  • Can choose either one mode of commute to begin: Biking OR Walking.
  • No mixture of commuting modes on a trip.

Advanced Level

Assuming conditions

  • Only One-way trip
  • No backtracking

Review Key Idea:

  1. GET something: station buttons btn class
  2. LISTEN something: button click event
  3. DO something: Display info when button clicks

NOTE: Setup user interface with two button classes. Eg) .btn1 , .btn2

  • Let clicks btn1 means variable choice1 to START
  • Let clicks btn2 means variable choice2 to STOP
  • Difference between the two stations is the total commute time
  • We are doing this because to have a “visual” understanding about how the codes work.

Extra Advanced Level

Assuming conditions

  • Add-on arrays for the remainder three routes: Line 1, Line 2, Line 3
  • However, can ONLY CHOOSE ONE of the four line routes.
    eg) Not go from a station to Line 1 to another station on Line 2
  • Always begin at any station on a line and finish at another station on the same line, (A to B).
    Therefore, no shortcut transferring to different line route.
  • Only One-way trip
  • No backtracking

Super Advanced Level

Assuming conditions

  • Think of any “real-world” scenarios possible going from an origin to a destination such as ...
  • Allows transfer station interchange to another line. ie. (A to B), (A to B to C ...)
  • Only One-way trip
  • No backtracking
  • Can begin from any station going to any station for the trip.
  • Note: Counting can be tricky for those stations locate at a transfer point connecting to another line(s) with multiple directional options, or those at end points of a line and are not connecting to another line.

BONUS challenges:

  • Instead of two button classes. Set them up into event classes
  • Convert total minutes into more familiar time expression in “hours, minutes”

Qs NEXT STEPS:

  • Setup all the four TTC lines into a SINGLE webmap interface

Web Map Interface

Step 1: Click a station to START

Step 2: Click another station to STOP

Step 3: Click info icon to display info

Step 4: Click reset icon to reset selections. Repeat Steps #1-3

LINE 1 Yonge-University





LINE 2 Bloor-Danforth





LINE 3 Scarborough





LINE 4 Sheppard-Yonge







Q: How did I come up such idea?

Background Story

CBC Archives, 2003: “Great North America Blackout”

On August 14, 2003 at around after 4pm EST, there was a sudden blackout in the GTA. The power outage in that evening rush hours had caused all the transits systems, included TTC, to immediately shut down.

As more news emerged, it turned out to be the “Great North America Blackout” that affected most of Southern Ontario and Northeastern United States. Some communities in cities were without power for only 1 to 3 days, some were affected for a week.

Many daily commuters in Downtown were finding alternative ways to return homes in the suburbs. Some luckier commuters were able to take the overcrowded replacement shuttle buses. While many had walked northbound (and uphill) along Yonge Street from Downtown going back homes. Stories from people had reported that walking from Union Station to Finch Station took at least 6 hours. Some commuters might had walked another 1 to 4 more hours for their trip to homes, depending on how far they reside away from the City of Toronto, which is commonly refer as “north of Steeles Avenue”.


A: If similar situation to happen again, I certainly would like to know how long to "horsepower" commute in between the TTC stations.