We’ve added a variety of new features to our postcode and point administrative area database, MaPit, in the past month – new data (Super Output Areas and Crown dependency postcodes), new functionality (more geographic functions, council shortcuts, and JSONP callback), and most interestingly for most people, a way of browsing all the data on the site.
- Firstly, we have some new geographic functions to join touches – overlaps, covered, covers, and coverlaps. These do as you would expect, enabling you to see the areas that overlap, cover, or are covered by a particular area, optionally restricted to particular types of area. ‘coverlaps’ returns the areas either overlapped or covered by a chosen area – this might be useful for questions such as “Tell me all the Parliamentary constituencies fully or partly within the boundary of Manchester City Council” (three of those are entirely covered by the council, and two overlap another council, Salford or Trafford).
- As you can see from that link, nearly everything on MaPit now has an HTML representation – just stick “.html” on the end of a JSON URI to see it. This makes it very easy to explore the data contained within MaPit, linking areas together and letting you view any area on Google Maps (e.g. Rutland Council on a map). It also means every postcode has a page.
- From a discussion on our mailing list started by Paul Waring, we discovered that the NSPD – already used by us for Northern Ireland postcodes – also contains Crown dependency postcodes (the Channel Islands and the Isle of Man) – no location information is included, but it does mean that given something that looks like a Crown dependency postcode, we can now at least tell you if it’s a valid postcode or not for those areas.
- Next, we now have all Lower and Middle Super Output Areas in the system; thanks go to our volunteer Anna for getting the CD and writing the import script. These are provided by ONS for small area statistics after the 2001 census, and it’s great that you can now trivially look up the SOA for a postcode, or see what SOAs are within a particular ward. Two areas are in MaPit for each LSOA and MSOA – one has a less accurate boundary than the other for quicker plotting, and we thought we might as well just load it all in. The licences on the CD (Conditions of supply of SOA boundaries and Ordnance Survey Output Area Licence) talk about a click-use licence, and a not very sraightforward OS licence covering only those SOAs that might share part of a boundary with Boundary-Line (whichever ones those are), but ONS now use the Open Government Licence, Boundary-Line is included in OS OpenData, various councils have published their SOAs as open data (e.g. Warwickshire), and these areas should be publicly available under the same licences.
- As the UK has a variety of different types of council, depending on where exactly you are, the postcode lookup now includes a shortcuts dictionary in its result, with two keys, “council” and “ward”. In one-tier areas, the values will simply by the IDs of that postcode’s council and ward (whether it’s a Metropolitan district, Unitary authority, London borough, or whatever); in two-tier areas, the values will again be dictionaries with keys “district” and “council”, pointing at the respective IDs. This should hopefully make lookups of councils easier.
- Lastly, to enable use directly on other sites with JavaScript, MaPit now sends out an “Access-Control-Allow-Origin: *” header, and allows you to specify a JSON callback with a callback parameter (e.g. put “?callback=foo” at the end of your query to have the JSON results wrapped in a call to the foo() function). JSONP calls will always return a 200 response, to enable the JavaScript to access the contents – look for the “error” key to see if something went wrong.
Phew! I hope you find this a useful resource for getting at administrative geographic data; please do let us know of any uses you make of the site.
Can this handle things like Red Routes in London?
One problem with fix my street is that red routes are the responsibility of Transport for London. So an enhancement would be to have the obvious things (potholes etc) where the location is on a red route, to be routed to TFL.
Currently there is no monitoring of TFL’s awful performance of getting things fixed.
Nick
Similarly to what Nick has said, in London all traffic lights are the responsibility of TfL, thus there is a few days delay while the London Boroughs forward the requests/problems on to TfL, whereas it would probably be better if they went straight there.
This isn’t really anything to do with MaPit, which is a database of administrative areas and postcode/point lookups, but anyway, yes, we’d obviously like TfL problems to be routed directly to TfL, but haven’t yet had the resources. Hopefully we will be able to do so in the near future.
The HTML pages are very useful; in their own right and as a human-friendly gateway to open data such as your KML files.
Accordingly, I’ve added links to them from birmingham.gov.uk/open-data (we (BCC) are very keen to signpost open data from other sources, as well as our own) and from Wikipedia’s map-links page.
For an example of the latter, see the article on the Electric_Cinema, Birmingham, then select the coordinates (shown by default in the top-right), and on the page of links to mapping services, the MaPit link is the final item under the “Great Britain” heading.
No doubt DBPedia will soon pick up this pathway to additional linked data, from their versions of Wikipedia articles.
DBPedia usage suggested at http://bit.ly/bhhjja
Thanks Andy 🙂
Hi,
I just wondered what the difference between the Generalised (OLG) and Full (OLF) Lower Level Super Output Areas are? Is it the thing you refer to above where one is plotted better than the other? I see OLF is a bigger KML file size – does that make much of a difference in terms of how it gets loaded to GoogleMaps (i.e. how many areas you can display on one ‘page’)?
Thanks very much for your help.
I found this website yesterday and it’s amazing. I’m mapping deprivation in Leeds and this has saved me weeks if not months of work.
Yes, the generalised SOAs are simplified versions, with less accurate boundaries and constrained to the Mean High Water mark, so will be better for generic plotting work that doesn’t need total accuracy. I’m afraid I don’t know how much of a difference it would make to Google Maps, but I assume it would make some, and if the OLG ones are good enough, I’d go with them.
Glad to be of help – do let us know more details of what you’re doing when you’re finished 🙂