My Subway Commute

2008-09-27 12:58 - General

Graph of my subway commute

I have a bit of a self professed love for attempting to gather data and represent it visually. If you browse through my archives, you'll find plenty of examples. I'm no master statistician, but I certainly come up with results that I trust, and are often interesting, if not surprising. To the left, you'll see another example of this: an image representing a graph representing the details of exactly how long it takes me to commute to/from work via the subway here in the city.

The rest of the text here explains exactly what that image says, and how I got the data to make it. First, the graph. At the left, you'll see wide and narrow tick marks. The wide marks are 10 minutes apart, and the narrow marks are the 5 minute periods between those. You can thus quickly see that, on average, my commute takes just over 70 minutes, each way. I always thought it was much closer to 60, until I measured it. At the top and bottom, you see a dark green color, representing time spent walking to/from the subway on each end. The light green stripes in between are time spent moving, while the dark red stripes are time spent sitting still, labeled with which station the wait is at. You'll notice of course that there's a big red bar at the top, it always takes a while between when you arrive at the station, and when the train gets there.

I used my trusty HP 200LX palmtop computer to gather this data. I used the Lotus 1-2-3 spreadsheet, setting up two templates, all the points on the way to work, and all those on the way home. Basically, each time I started moving or stopped moving, I'd punch the key to fire off the macro to insert the current time into the cell. The spreadsheet automatically calculated how long that step took. These values were then grouped together, time spent waiting in a station and time spent traveling between the two same stations, regardless of direction of travel. They were averaged, and discounting times I just missed pressing the button, each data point had 7, 8, or 9 times to average together. The exception is the time spent waiting for the train, because it was split between two different stations depending on direction of travel. Four points were averaged for the wait at Prince street. (Interestingly, this was 214 sections, but the wait for the other way in the morning averaged 348 seconds, much longer.)

From there, it was a bit of manual effort to massage the values such that they could be grouped together and averaged. I came up with the data that made this graph, which I ended up generating with a quick PHP script. If you're interested, you can see the raw data and averaged and ordered events in CSV.

If you look at the red stripes, you can identify a few key things right off. Between Whitehall and Court streets we're traveling across the river between Manhattan and Brooklyn, thus it's a long line. Cortland street, between Rector and City Hall, is closed, leaving another wide green stripe. You can also generally notice the "express" stops by the wider red lines. In Brooklyn, the Pacific, 36th and 59th street stops are where the express and local lines both stop. The local line, which I ride, will often sit around waiting to give both trains a chance to be in the station at the same time, and for riders to switch back and forth between them. There's also generally more traffic in and out of the cars, making it take longer. It's also commonplace for the wait at 86th street to be extra long, there can be congestion at 95th street, which is the end of the line, where I get off!

The final thing I'll mention is the decision I made long ago, which this graph helps reinforce. If you look at the time spent just walking and waiting to connect to the subway, you'll see that it's twenty of the seventy overall minutes. Even if I were to move three times closer to work, but far enough that I still needed to ride the subway to commute, that would make a likely average of 20 minutes walking and waiting, plus 16 minutes riding. That's a total of 36 minutes, not a giant savings weighed against the giant rise in rent required for a closer apartment. So I've always stuck where I am! The chance to read, nap, play, or otherwise occupy myself while sitting on the subway is better than you might think at first.


No comments!

Post a comment:

  If you do not have an account to log in to yet, register your own account. You will not enter any personal info and need not supply an email address.

You may use Markdown syntax in the comment, but no HTML. Hints:

If you are attempting to contact me, ask me a question, etc, please send me a message through the contact form rather than posting a comment here. Thank you. (If you post a comment anyway when it should be a message to me, I'll probably just delete your comment. I don't like clutter.)