Marc Hughes

I am a developer from a bit west of Boston.

Long commute? Optimize it!

07 May 2009

I've got a long commute into work on a daily basis. That commute gives me a lot of time to sit alone in my car and contemplate the fact that I have a long commute.

In the middle of the night I can drive it in 45 minutes, but with traffic it's never under an hour, often 1.5 or more.  I've noticed that very small variations in when I leave, even just 10 or 15 minutes one way or another, can really make a huge impact.  But it's not a sure thing.  Some days leaving at 7:45 is the best, some days it's 8:00.  I don't know why it differs.

It's my belief there are certain patterns that might take into account things like weather, day of the week, departure time, school vacations, and a bunch of other variables.  But I don't have a good way to that figure that out since I'm lacking the data.

Which brings me to my latest mini-project.  I'm writing some mobile software for my phone, plus a website that will help to record my daily commute and visualize what's happening.  Eventually, I hope to bring in some statisitical models to help predict my average commute time based on when I leave the house.

  • Phase 1: Start collecting data on my phone
  • Phase 2: Collect the data on a website.
  • Phase 3: Visualize the data.
  • Phase 4: Make predictions based on a single user's data.
  • Phase 5: Collate multiple users who commute in the same area to improve #3 and #4
It's my hope that someday I'll be able to answer questions like:
  • Tomorrow, what reasonable time should I get out of the house for the shortest commute?
  • I'm running late, should I work from home for an hour or head straight in to avoid some traffic?
  • What week is the worst traffic-wise of the year?  (And hence, what week should I favor for planning a vacation)
  • What's my fastest commute time?  Did I break that record today?
Today, I recorded my first commute to my Android powered G1.  I wrote an application that allows me to press a button to start/stop recording my commute.  It notes the start and end time, plus saves GPS data about waypoints along the way.  A future version of that app will upload the data to a web server, but for now it just collects it into a database.

Any other commuters out there be interested in something like this?

P.S. "Long commute" is a very relative term.  A half hour might be long for some people, and a 3 hour commute might be long for others.