Something that drives me nuts is every so often there’ll be an accident on the M3 or M27 and the entire surrounding area will be flooded with people trying to avoid the deadlock, only to find they’re on a tiny road with thousands of other people. Yes, I could check the traffic websites each morning, or do some intelligent parsing of traffic RSS feeds, but the first option requires effort before 9am (not going to happen), and the second option is never going to be reliable enough – it’d be too hard to programmatically determine how bad the conditions on the road really are.
What I really want is a text message telling me which junctions on the M27 and M3 are delayed and roughly what their speed are. While I don’t actually use the motorways to get to work, if they’re gridlocked, the surrounding country-roads tend to also be gridlocked, so this should work. My house already texts me thanks to twitter, so that part of the system is easy, and has the bonus of other people can use it.
After discovering a site that gives average speeds between junctions, cogs started to whir. Unfortunately the site doesn’t provide a nice feed, but that wasn’t going to stop me.
A few hours of Java hacking later, @hants_motorway was born.
Every 20 minutes, between 7am-10am and 4pm-7pm, the speeds of each junction between J2-J12 on M27 and J4-J14 on M3 are recorded in a database, and compared against the speed of that junction at that time in the previous month. If it is less than 45%, it assumes there’s a delay and puts a message on Twitter. When the list of junctions delayed change, or the delays end, another message is put on Twitter.
I’ve setup my personal account (@ejellard) to follow @hants_motorway and to text me each update.
I’m hoping that this means that those driving from the Southampton area to some location near Winchester won’t have to sit in stupid amounts of traffic. I obviously can’t guarantee it’s accuracy, and no doubt my house will have a power-cut or network outage the one day it would be useful, but it shouldn’t give false-positives (or negatives, depending which way you look at it). Let me know what you think, and if there are any better ways of doing this.
And the M27: