Concepts
Areas and boundaries
Area codes
Every official area has a code. Birmingham City Council is E08000025, and a code's first letter usually tells you the country: E for England, W for Wales, S for Scotland and N for Northern Ireland. Some Northern Ireland statistics use their own codes, like 95AA01S1.
Codes are the reliable way to name an area. Names aren't unique, but codes are.
Geographies
A geography is a kind of area. You'll see these most often:
| Geography | What it is |
|---|---|
ward | Electoral wards, the building blocks of councils |
localAuthority | Councils, like Leeds or Cornwall |
constituency | Westminster parliamentary constituencies |
region | The English regions, like the North West |
lsoa | Small statistical areas in England and Wales |
dataZone | Small statistical areas in Scotland |
List geographies returns every one the Atlas knows about.
Boundary releases
A boundary release is a dated snapshot of one geography's boundaries, as its publisher released them. Its id tells you what it is:
2024-07-uk-bgcis the July 2024 release covering the UK.- The middle part is the coverage, such as
uk,gb,ew(England and Wales),enorsc. - The last part is the publisher's boundary type:
bgc(orgcbin a few older releases) is generalised and clipped to the coastline, andbfcis full resolution and clipped to the coastline. - A suffix such as
-v2marks a corrected edition the publisher reissued. A few releases from other publishers have shorter ids, like2011-ni. - A year can have more than one release. Use the full id, including its month and coverage, when you need one exact set of shapes.
Not sure which release to use for a date? Find boundaries for a date picks the right one. The geography pages list every available release and its coverage.
Moving to a newer release? Compare boundary releases lists the codes the two share, the codes added and the codes gone, and where there's published evidence, whether a shared code's boundary stayed the same.
Naming an exact area
Because the same code can appear in several releases, an area's full identity has three parts: its geography, its boundary release and its code. You'll see them together in URLs:
curl "https://api.ukdataatlas.com/v1/areas/constituency/2024-07-uk-bgc/E14001262"To get every area in a release, such as all wards for a lookup table, list them a page at a time, or download the release whole from its boundary release page.
curl "https://api.ukdataatlas.com/v1/areas?geography=ward&release=2024-12-uk-bgc&limit=100"What an area contains
To ask which wards are in Manchester, list the council's children. childGeography picks the kind of area, and without it you get the newest release of each geography that was current alongside the council's.
curl "https://api.ukdataatlas.com/v1/areas/localAuthority/latest/E08000003/children?childGeography=ward"Parents work the other way. A ward's parents include its council and the constituencies it falls inside, and depth follows the chain further up.
curl "https://api.ukdataatlas.com/v1/areas/ward/latest/E05011350/parents"Both only list areas that fit wholly inside one another, as their publishers declare. Where areas only partly overlap, such as wards that straddle a constituency boundary, use a crosswalk instead.
When areas change
Councils merge, wards are redrawn and constituencies are reshaped, so a code can stop appearing in newer releases. Ask for Allerdale (E07000026) in the latest release and you get area_not_in_release, with presentIn listing the releases that still hold it. Ask one of those for the code's history to find out what happened:
curl "https://api.ukdataatlas.com/v1/areas/localAuthority/2022-12-uk-bgc-v2/E07000026/history"Allerdale's successor is Cumberland (E06000063), from April 2023, and Cumberland's own history lists the three councils it was merged-from. Each link names the published lookup it comes from:
| Relation | What it means |
|---|---|
successor, predecessor | The publisher's lookup says one area became another. |
merged-from, split-from | The new area was made from several old ones, or is one part of an old area. |
equivalent-to | The same extent in the neighbouring release, so nothing changed between them. |
sameCodeReleases lists every release that uses the same code. That alone doesn't mean the boundary stayed the same, since publishers sometimes redraw an area and keep its code.
The archive starts at different years for each geography: 2008 for local authorities, 2011 for wards and 2015 for constituencies. Each geography page lists exactly which releases it has. Earlier boundaries aren't in the Atlas yet.
Which areas data is on
Publishers release statistics against the area codes that were current when they made them. When you ask for data, you name that set of codes with two parameters:
geography: the kind of area the publisher used, such asward.codeYear: the year of the codes they used, such as2023.
This doesn't choose which boundaries to draw. To put values on a map, add a release. The API only accepts one that contains every area code in the data, so nothing silently goes missing. A release that doesn't fit is refused with incompatible_geometry, naming the releases that would, and a measure's evidence document lists every compatible release.
Shapes
Shapes come back as GeoJSON in ordinary longitude and latitude (WGS 84). Full detail can be heavy, so geometry endpoints take a tier of full, high, medium or low. medium or low is usually right for web maps.
Useful endpoints
get/boundary-releasesList boundary releasesget/boundary-releases/{geography}/{release}Get a boundary releaseget/areasList areasget/areas/{geography}/{release}/{code}Get an areaget/areas/{geography}/{release}/{code}/childrenList child areasget/areas/{geography}/{release}/{code}/parentsList parent areasget/areas/{geography}/{release}/{code}/historyGet an area's historyget/areas:validateCheck codes or namesget/areas/{geography}/{release}/{code}/geometryGet an area's shape