Last reviewed: Next review due:
1. Why boundary data matters
Almost every data story that mentions a place needs a boundary. To map council spending, compare crime rates between wards, or link deprivation to health outcomes, you need the geographic shape of each area and a code that ties your figures to it. Get the geography wrong — the wrong year, the wrong level, the wrong code — and every number downstream is wrong too.
The UK has a rich, well-documented set of official geographies, nearly all of it free. This guide covers where to get boundaries, how the coding system works, and which geographies are current in 2026.
2. The ONS Open Geography Portal
The primary source is the ONS Open Geography Portal. It holds three things you will use constantly: boundaries (the geometry, as shapefiles and GeoJSON), lookups (tables linking one geography to another, such as ward-to-council), and names and codes registers. Everything is downloadable and openly licensed under the Open Government Licence, which needs only attribution.
When you download a boundary, note the generalisation level and clipping. Full-resolution files are precise but heavy; the generalised and super-generalised versions are far lighter and better for web maps. Files clipped to the coastline (BFC/BGC) look tidy; the extended versions include estuaries and offshore areas.
To download, search the portal for the geography you want, open its page, and export as GeoJSON, shapefile or CSV; many datasets also expose a feature-service URL you can load straight into QGIS without downloading a file at all. The portal additionally hosts a code-history database that records when codes were created or retired — invaluable when your data spans a boundary change.
3. Standard geography codes (GSS / ONS codes)
Every official area carries a GSS code — a nine-character identifier like E06000001. The leading letter marks the country (E, W, S, N) and the digits encode the geography type. These codes are the backbone of reliable joins: match your data to boundaries on the code, never the name.
- Local authority districts, unitary authorities, counties and London boroughs — the everyday council geographies.
- Electoral wards — the building blocks of local democracy, and the finest routine council-level unit.
- LSOAs and MSOAs — small, population-balanced census areas ideal for deprivation and small-area mapping.
- Westminster parliamentary constituencies — for election and MP-level analysis (note the 2024 boundary review changes).
- Output areas — the smallest census geography, for the most granular work.
4. Combined authorities and mayoral areas
Combined authorities are the current vehicle for regional governance in England — groups of councils that pool powers over transport, skills and economic development, many led by a directly elected metro mayor. Examples include Greater Manchester and the West Midlands. Their boundaries are maintained on the Open Geography Portal and are the right geography for present-day regional and devolution stories.
Because the map of devolution keeps changing — new combined authorities are created and their membership can expand — always download the current boundary and note the vintage. A combined authority that existed last year may cover more councils this year.
When you write about a combined authority, state which councils it contains at the time of your story, and be precise about the difference between the combined authority area and any single council within it — readers, and press regulators, will not forgive conflating the two.
5. Local Enterprise Partnerships — a legacy geography
Local Enterprise Partnerships (LEPs) were business-led bodies covering economic sub-regions of England. They are important to understand, but they are no longer a live administrative geography: from 2024 their economic-development functions were largely wound down and integrated into local authorities and combined authorities. Treat LEPs as a transitioning or historic geography, not a current one.
You can still use historic LEP boundaries legitimately — for a time series, or to analyse how funding was allocated while LEPs operated — but always date the analysis and explain their status. Do not present LEPs as a maintained, present-day boundary set. For current regional economic work, steer readers to combined authorities, mayoral areas and standard ONS geographies instead.
6. Postcode-to-area lookups (ONSPD)
The ONS Postcode Directory (ONSPD), also on the Open Geography Portal, is the workhorse for turning postcodes into areas. It maps every current and terminated UK postcode to the geographies that contain it — council, ward, constituency, LSOA and more — and gives a grid reference for each. Join your postcodes to the ONSPD to attach the GSS codes you need, then join those to boundary geometry.
Two cautions: postcodes are assigned to a best-fit area, not carved into polygons, so a postcode near a boundary can sit in a neighbouring area; and postcodes are recycled and retired, so a terminated code will not match. Always use the latest directory and note its release date.
A close relative, the National Statistics Postcode Lookup (NSPL), assigns postcodes to output areas and rolls them up from there, which some analysts prefer for statistical work. Either way, the directories are refreshed several times a year, so build the release date into your method note.
7. Lookups: rolling small areas up to large ones
The portal's lookup tableslet you translate between geographies — ward to council, LSOA to MSOA to local authority, constituency to region. This is how you aggregate: attach the higher-level code to each small area, then group and sum. It is far safer than a spatial join, because it uses the official, published relationships rather than guessing from overlapping shapes.
Watch for “best-fit” versus “exact-fit” lookups. Best-fit assigns each small area wholly to one larger area even where the real boundaries do not align perfectly; exact-fit only exists where geographies nest cleanly. Know which you are using before quoting a total.
A worked example: to report a figure by council when you only have it by ward, take the ward-to-council lookup, attach each council code to its wards, then group and sum. Because the lookup is official, your totals will reconcile exactly with the published council-level figures — something a shape-overlap join can never guarantee.
8. Joining boundaries to your data
Once you have the geometry and your statistics both carrying the GSS code, the join is straightforward in QGIS or any spreadsheet. Load the boundary layer, add your figures as a table, and join on the code column. If rows come back blank, the codes did not match — the usual culprits are a code stored as a number (dropping a leading zero), a stray space, or two datasets built on different geography vintages.
Our QGIS basics guide walks through the join and choropleth styling step by step.
9. Boundary pitfalls to avoid
- Mixing geography vintages — boundaries change most years; a 2021 ward file will not fully match 2024 data.
- Treating LEPs, or any wound-down geography, as current — always check a geography is still maintained.
- Joining on names instead of GSS codes, which silently drops non-matching rows.
- Using full-resolution boundaries for a web map, producing enormous, slow files.
- Assuming postcodes are polygons — they are points assigned to a best-fit area.
10. Geographies of the four nations
The ONS Open Geography Portal is the best single starting point, but England is where its coverage is deepest. For detailed work in the other nations, go to the body that maintains each one. The GSS coding system still ties everything together — the leading letter (E, W, S, N) tells you which nation an area sits in.
- Scotland — National Records of Scotland (NRS) publishes Scottish boundaries and data zones, the Scottish equivalent of small-area geographies.
- Wales — StatsWales and DataMapWales carry Welsh administrative geographies and statistics alongside the ONS files.
- Northern Ireland — NISRA, with Ordnance Survey of Northern Ireland (OSNI), maintains NI geographies such as super output areas and district electoral areas.
- Census timing and small-area definitions can differ between the nations, so never assume an English geography maps cleanly onto a Scottish or NI one.
11. Boundary-data checklist
- I downloaded boundaries from the ONS Open Geography Portal, not an unofficial mirror.
- The boundary vintage matches the year of my data.
- I am joining on the GSS code, stored as text, in both datasets.
- I chose a generalisation level suited to print or web.
- I confirmed every geography I use is current, not wound down (for example, not LEPs).
- I used official lookups, not a spatial guess, to aggregate small areas.
Put boundaries to work
With the right geography in hand, load it into QGIS to build a map, or read our guide to the UK statistical bodies that publish data against these areas.
Frequently asked questions
Where do UK boundary files actually come from?
What is a GSS code and why should I use it instead of a name?
What are LSOAs and MSOAs, and when would I map them?
How do I turn a list of postcodes into areas I can map?
Do Local Enterprise Partnership boundaries still exist as a live geography?
Related guides
Primary sources
- ONS Open Geography Portal— Office for National Statistics
- ONS names, codes and lookups— Office for National Statistics
- MHCLG — local government and devolution— Ministry of Housing, Communities & Local Government
- Open Government Licence v3.0— The National Archives
- NRS Scotland geography— National Records of Scotland