Every road user relies on signs, so keeping them tip-top is in everyone’s interest. Now Transport Focus have launched their Sort My Sign campaign, asking road users to help them do just that.
They’d like everyone to report any signs they spot that are dangerous, dirty, broken, or obscured.
To support this programme digitally, Transport Focus came to mySociety, asking if we could help create a simple and intuitive mapping interface where these issues could be reported.
Specifically, the scheme covers signs on roads managed by Highways England, which means motorways and some A roads.
FixMyStreet was the obvious starting point — we already have a data layer for these roads, which means that your everyday FixMyStreet reports can be routed to Highways England rather than the council if they are the responsible body.
Plus, as we’ve detailed many times before, the FixMyStreet platform can be repurposed for any project dealing with location-based reports, and has in the past been put to all sorts of uses, from reporting empty homes to helping fight corruption.
Nonetheless, we perceived one potential challenge when it came to setting up sign reporting.
FixMyStreet is generally well-suited for people making reports on the go — in fact, thanks to the ‘use my location’ functionality, it is ideal for reporting issues like potholes or broken pavements on your mobile while out on a walk. But obviously, road signs are a slightly different matter. If you are driving, you certainly mustn’t be fiddling with your mobile phone, so ‘use current location’ is only helpful if you have an amenable passenger to make the report.
That’s fine — you can always make the report later of course: but that means you’ll need to know roughly where you were when you saw the sign, something that’s a bit trickier on a long drive than it might be on a stroll around your neighbourhood. FixMyStreet allows you to find any UK location with the input of a postcode or street name, but these are details you’re unlikely to have to hand if you have simply driven through.
After some thought we realised that, on a motorway, the location identifier most people will find easiest to recall will probably be the junction number.
So that set us a challenge: how could we best enable ‘search by junction number’?
Ideally, we wanted a user to be able to visit the Sort My Sign site and enter the name of a junction, just as they’d enter a postcode or street on the FixMyStreet homepage — and then to be taken to a map centred on that point.
But sourcing a mapping between motorway/junction number and co-ordinates proved surprisingly tricky. mySociety developer Matthew takes over the story.
“I first looked at OpenStreetMap data — its geocoder, Nominatim, worked really well for some junction numbers, but didn’t work at all for others. If a junction has been assigned a name (like J23 on the M6, which is known as ‘Haydock’) it can only be looked up by that name, not by number. But we wanted users to be able to look up junctions by number.
“I could also export all the junction data from OpenStreetMap, but the junction nodes alone aren’t linked to the motorway, so that looked like it would prove tricky to match up.”
“But by a stroke of luck, I then discovered that someone had used another of mySociety’s services, our Freedom of Information site WhatDoTheyKnow, to make a request to Highways England asking for the positions of all the driver location signs (the repeaters every 100m or 500m along the motorways giving the name and distance from start).
“In response, Highways England had provided that information, so I knew I could use that to at least provide a mapping between location sign and geographic co-ordinates.
“Each sign also had information about what junction it was nearest or between, so by constructing an average of all the location sign co-ordinates associated with a particular junction, I came up with a pretty good estimate for the location of the junction itself.
“I added all the sign and junction data into a small SQLite database (which means it’s portable and doesn’t need to be associated with the main database) and wrote a little bit of code to spot when someone entered a junction name in any of a variety of different formats, then look up the matching location in this database”.
To test this out, Matthew had all his colleagues name their favourite junction… perhaps not to be recommended as a party game, but it did at least prove that his code had cracked the problem.
Something much appreciated by Head of Strategy at Transport Focus, Guy Dangerfield, who says, “mySociety has been excellent in understanding what we needed and finding ways to achieve our objectives.”
You can give the new system a go here — and perhaps bookmark the site so that you know where to report a sign next time you see one that needs fixing.
Once you’re safely off the road, that is.