It’s a more common problem than you might think: given a list of postcodes, how can you match them to the administrative and electoral areas, such as wards or constituencies, that they sit within?
MapIt’s data mapping tool gives a quick, easy and cheap solution: just upload your spreadsheet of postcodes, tell it which type of area you want them matched to, and the data is returned to you — complete with a new column containing the information you need.
The tool can match your postcodes to every type of data that MapIt offers in its API, including council areas, Westminster constituencies, parish wards and even NHS Clinical Commissioning Groups (CCGs).
If that doesn’t sound like something you can imagine being useful, let’s look at a few hypothetical use cases (and if you have an actual case that you’d like to tell us about, please do let us know — we’re always keen to hear how our tools are being used).
Organisations, charities and campaigns sometimes need to match postcodes to administrative areas
Membership organisations, charities and campaigns usually collect the addresses of supporters, but don’t commonly ask them who their MP is (even if they did ask, most people in the UK don’t actually know the name of their MP).
But when a campaign asks followers to contact their MPs, it’s helpful to be able to suggest an angle based on whether the MP is known to be sympathetic to their cause, or not — indeed, there’s arguably no point in contacting MPs who are already known to be firmly on board.
So: input a spreadsheet of supporters’ postcodes, and get them matched to the associated Westminster constituencies.
For more advanced usages, organisations might match the MapIt tool’s output of postcodes with other datasets to discover the answers to questions like:
- Which members in a disability group have fewest GPs in their area, and might be finding it difficult to get help for their condition?
- Which supporters of a transport charity live in regions less served by public transport, and would be likely to take action to campaign for improved bus and train services?
- Which people affiliated to an ecological organisation live in predominantly rural areas and could help with a wildlife count?
Researchers sometimes need to match postcodes to administrative areas
Researchers often need to correlate people, institutions or locations with the boundaries they fall within.
They might have a list of postcodes for, say, underperforming schools, and want to find out whether they are clustered within authorities that have similar characteristics, like cuts to their funding or an administration that has a political majority one way or the other.
Teamed with other datasets, MapIt can help towards answering important questions like the number of people each CCG serves, how unemployment rates vary in different European regions, or average house prices within parliamentary constituencies.
Journalists sometimes need to match postcodes to administrative areas
Investigative or data journalists may obtain long spreadsheets full of postcodes in the course of their work, perhaps as a result of having submitted Freedom of Information requests to one or more authorities.
Perhaps they have the address of every university in the country, and there’s an election coming up — during the summer holidays. Knowing that students will mostly be in their home constituencies, they might be able to make informed predictions about how votes in the university towns will be affected.
Or let’s say that a journalist has gathered, from local councils, an address for every library scheduled to close. This could be compared with another dataset — perhaps literacy or crime rates — to draw conclusions over what impact the closures would have.
Part of a wider service
The one-off data mapping tool is just one service from mySociety’s MapIt, which is best known for its API.
This provides an ongoing service, typically for those running websites that ask users to input geographical points such as postcodes or lat/longs, and return tailored results depending on the boundaries those points fall within.
MapIt powers most mySociety sites, for example:
- When you drop a pin on the map while using FixMyStreet, MapIt provides the site with the administrative boundaries it falls within, so that the site can then match your report with the authority responsible for fixing it.
- When you type your postcode into WriteToThem, Mapit gives the site the information it needs to to display a list of every representative, from local councillor up to MEP, who represents your area.
- If you search for your postcode on TheyWorkForYou, MapIt tells the site what your Westminster constituency is and the site matches that to your MP. You can then be taken to their page with a record of how they have voted and everything they’ve said in Parliament.
Give it a try
Image: Thor Alvis
You may remember that in August this year, mySociety and Open Knowledge International launched a survey, looking for the sources of digital files that hold electoral boundaries… for every country in the world. Well, we are still looking!
There is a good reason for this hunt: the files are integral for people who want to make online tools to help citizens contact their local politicians, who need to be able to match users to the right representative. From mySociety’s site TheyWorkForYou to Surfers against Sewage’s Plastic Free Parliament campaign, to Call your Rep in the US, all these tools required boundary data before they could be built.
We know that finding this data openly licensed is still a real challenge for many countries, which is of course why we launched the survey. We encourage people to continue to submit links to the survey, and we would love if people experienced in electoral boundary data, could help by reviewing submissions: if you are able to offer a few hours of help, please email firstname.lastname@example.org
The EveryBoundary survey FAQs tell you everything you need to know about what to look for when boundary hunting. But we also wanted to share some top tips that we have learnt through our own experiences.
- Start the search by looking at authoritative sources first: electoral commissions, national mapping agencies, national statistics bodies, government data portals.
- Look for data formats (.shp, .geojson, kml etc), and not just a PDF.
- Ask around if you can’t find the data: if a map is published digitally, then the data behind it exists somewhere!
- Confuse administrative boundaries with electoral boundaries — they can be the same, but they often aren’t (even when they share a name).
- Assume boundaries stay the same — check for redistricting, and make sure your data is current.
If you get stuck
- Electoral boundaries are normally defined in legislation; sometimes this takes the form of lists of the administrative subdivisions which make up the electoral districts. If you can get the boundaries for the subdivisions you can build up the electoral districts with this information.
- Make FOI requests to get hold of the data.
- If needed, escalate the matter. We have heard of groups writing to their representatives, explaining the need for the data. And don’t forget: building tools that strengthen democracy is a worthwhile cause.
mySociety is asking people to share electoral boundary data as part of efforts to make information on every politician in the world freely available to all, and support the creation of a Democratic Commons. Electoral boundary files are an essential part of the data infrastructure of a Democratic Commons. A directory of electoral boundary sources is a potential benefit to many people and organisations — so let’s keep up the search!
Photo: Chase Clark
We, and Open Knowledge International, are looking for the digital files that hold electoral boundaries, for every country in the world — and you can help.
Yeah, we know — never let it be said we don’t know how to party.
But seriously, there’s a very good reason for this request. When people make online tools to help citizens contact their local politicians, they need to be able to match users to the right representatives.
So head on over to the Every Boundary survey and see how you can help — or read on for a bit more detail.
Data for tools that empower citizens
If you’ve used mySociety’s sites TheyWorkForYou — or any of the other parliamentary monitoring sites we’ve helped others to run around the world — you’ll have seen this matching in action. Electoral boundary data is also integral in campaigning and political accountability, from Surfers against Sewage’s ‘Plastic Free Parliament’ campaign, to Call your Rep in the US.
These sites all work on the precept that while people may not know the names of all their representatives at every level — well, do you? — people do tend to know their own postcode or equivalent. Since postcodes fall within boundaries, once both those pieces of information are known, it’s simple to present the user with their correct constituency or representative.
So the boundaries of electoral districts are an essential piece of the data needed for such online tools. As part of mySociety’s commitment to the Democratic Commons project, we’d like to be able to provide a single place where anyone planning to run a politician-contacting site can find these boundary files easily.
And here’s why we need you
Electoral boundaries are the lines that demarcate where constituencies begin and end. In the old days, they’d have been painstakingly plotted on a paper map, possibly accessible to the common citizen only by appointment.
These days, they tend to be available as digital files, available via the web. Big step forward, right?
But, as with every other type of political data, the story is not quite so simple.
There’s a great variety of organisations responsible for maintaining electoral boundary files across different countries, and as a result, there’s little standardisation in where and how they are published.
How you can help
We need the boundary files for 231 countries (or as we more accurately — but less intuitively — refer to them, ‘places’), and for each place we need the boundaries for constituencies at national, regional and city levels. So there’s plenty to collect.
As we so often realise when running this sort of project, it’s far easier for many people to find a few files each than it would be for our small team to try to track them all down. And that, of course, is where you come in.
Whether you’ve got knowledge of your own country’s boundary files and where to find them online, or you’re willing to spend a bit of time searching around, we’d be so grateful for your help.
Fortunately, there’s a tool we can use to help collect these files — and we didn’t even have to make it ourselves! The Open Data Survey, first created by Open Knowledge International to assess and display just how much governmental information around the world is freely available as open data, has gone on to aid many projects as they collect data for their own campaigns and research.
Now we’ve used this same tool to provide a place where you can let us know where to find that electoral boundary data we need.
Where to begin
Thanks for your help — it will go on to improve citizen empowerment and politician accountability throughout the world. And that is not something everyone can say they’ve done.
Image credit: Sam Poullain