From the Google Latitude dashboard, you can export your history of location updates as a KML file. I downloaded my history, and wrote a short, hacky Python script to parse it, and generate a heat map to overlay on a Google map.
In this post, I’ll show the sorts of results it can generate, and share my script, in case any other Latitude users fancy giving it a go.
I wrote this week about my new Android app, which checks for road traffic problems affecting UK routes. I mentioned that it wasn’t ready for release yet, because there are a few admin issues that I need to sort.
One of the problems is in how I get the routing data.
The app relies on comparing the locations of traffic problems with the user’s route.
Getting the location of traffic problems isn’t too hard as there are feeds from the Highways Agency and the BBC that offer that.
But getting a detailed description of a route between two places, in a format that I can use to compare against the traffic problems, proved harder.
I’ve been travelling a lot for work recently. Most of it has been by car, and on a few occasions, I’ve run into traffic problems that have made me late.
This got me thinking about what I could do to make things easier.
There are websites with traffic info – such as the Highways Agency or motoring organisations like the AA and RAC. They show travel information for a particular region, or the UK as a whole.
But that’s not really enough.
For one thing, I have to remember to check. I’m not a morning person – particularly when I need to get up at 5am so I can drive for hours. Any approach that relies on me remembering to do something isn’t off to a great start.
And it’s too manual. They show me all of the traffic problems, and it’s up to me to manually work out which of them might affect my route. There is too much noise, with too many traffic reports for places that are nowhere near me, or where I want to go. It’s up to me to filter that out.
At any rate, I don’t want to boot up a computer at 5am, so an AJAX-heavy website that doesn’t work on mobiles isn’t an ideal fit anyway.
My ideal approach would be:
My mobile phone is already my alarm clock. It’s the only screen I look at when I get up in the morning, so this is the ideal place to get traffic info.
My mobile knows when I’m going to go somewhere, and where I’m planning to go. It shouldn’t need me to manually check every day – it should check for me automatically, and alert me if it finds any problems.
Showing me every traffic problem is too much. My mobile knows where I am, and where I’m going. I only want to see problems that are on (or perhaps very near) my route. Anything else should be filtered out, leaving me with just the updates relevant to me.
I went looking for a mobile app that does this, but didn’t have any luck. There are a couple of Android apps with UK traffic information (one from the RAC, the other by the brilliantSimon Judge).
They at least get the traffic info into a mobile-friendly format. But they still show you every traffic problem, and only when you remember to check. I couldn’t find anything that meets all three of my needs.
So I’ve written one.
It’s basic looking… and perhaps a little rough around the edges. But it’s a start.
You enter in routes – which is a start and an end location. This can be a town or city name, a full address, or a postcode.
From there, you can either check the traffic now, or schedule the app to check at a later date and time. For regular journeys, you can describe a repeating pattern – so for example, I can tell it to check my route to work every weekday morning at 7am, and my route home every weekday evening at 4.45pm.
The app works out the route, and compares it with known traffic problems.
This can be done in the background, so it doesn’t matter if your phone is switched off when it’s time to check, or if you’re using another app.
If it finds any matches, it puts a warning in the notifications bar. Tapping on this can take you to a list of the problem descriptions, or an interactive map with both the route and the traffic problems marked on it.
It’s pretty neat, even if I say so myself. 🙂
And it’s something that I can see myself using.
So why am I not making it available for others now? I’ll leave that for another post…