Wednesday, December 30, 2009

Tracking Commute Times

A couple years ago I rigged up some GPS tracking on my car. I have a Garmin GPS 18 OEM hooked up to a laptop which sends this data over my phone to a custom site I created. There's tons of interesting analysis that can be done with this data but the one that has the highest proportion of my mind share is analyzing my commute (since I do it every day).

One function that I implemented in this site is a "path search". Basically it lets you define two points and then finds all of the paths between those points with relevant statistics like how far you drove and for how long. I did this for my commute to get a graph of durations by when the commute started. Blue is to work and red is from work.

Its pretty obvious the effect of rush hour on both the outgoing and incoming routes. The discrepancy in the duration of the two directions is interesting and most likely caused by the 5 (count them ... 5) lights I have to go through in the 1/4 mile it takes to get onto the freeway from my house. The offramp on the way back skips most of these.

Another set of interesting conclusions that can be gained from this is information about when and how long I work. I rarely leave before 9 and this is good because traffic gets significantly better by then (like a 2x shorter commute according to this graph).

  • Average Arrival Time: 9:47 AM
  • Average Time at Work: 9.46 hours
  • Average Departure Time: 7:14 PM
Both the arrival and departure times make sense with what I'd say prior to this if asked. For some reason I never subtracted the two since the average time at work seemed higher than I would have guessed.

Technologies: PHP, Google Docs, MySQL

No comments: