Guide
Compare an area
Rank every area
Rank the local authorities by population for one period, largest first. Tied values share a rank, so you'll see 1, 1, 3.
curl "https://api.ukdataatlas.com/v1/data/population/rankings?period=2024&geography=localAuthority&codeYear=2023&limit=10"To see where one area ranks by how much it changed rather than by its value, use Rank areas by change with
place, as in Chart a trend.Put two side by side
Give a baseline and a comparison area to get both values and the difference. Unambiguous place names work as well as codes.
curl "https://api.ukdataatlas.com/v1/data/population/compare?period=2024&geography=localAuthority&codeYear=2023&baselinePlace=E08000025&comparisonPlace=E08000035"Both areas must be in the same published set of figures. For a rate or a share, the difference is reported on its own scale, not as a percentage change that would mislead.
Find the neighbours
The councils that share a border with Birmingham, longest shared border first. Borders are matched exactly from the boundaries, with no distance threshold, and areas that only meet at a corner are left out unless you add
touches=any.curl "https://api.ukdataatlas.com/v1/areas/localAuthority/2023-05-uk-bgc-v2/E08000025/neighbours"Example response200 { "apiVersion": "v1", "atlasRelease": "sha256:24a500c55416bd7d58c28b1fc8cc4931d4a2fd831addafa3116556a91f2c4857", "data": { "id": "localAuthority/2023-05-uk-bgc-v2/E08000025", "geography": "localAuthority", "boundaryRelease": "2023-05-uk-bgc-v2", "code": "E08000025", "name": "Birmingham", "touches": "edge", "border": { "perimeterM": 104147.22, "sharedBorderM": 104147.22, "unsharedBorderM": 0, "pointOnlyTouches": 0 }, "neighbours": [ { "id": "localAuthority/2023-05-uk-bgc-v2/E08000029", "code": "E08000029", "name": "Solihull", "touch": "edge", "sharedBorderM": 26694.1, "shareOfPerimeter": 0.2563, "sharedEdges": 153, "sharedVertices": 154 } ] }, "meta": { "nextCursor": null } }Then fetch each neighbour's value from the same partition, or rank them all and pick out their codes.
Compare across geographies
Constituencies and councils don't nest, so comparing them starts with how much they overlap. This measures a constituency against a council without downloading either shape, and returns the shared area, each side's share of it and a relation such as
withinoroverlaps.curl "https://api.ukdataatlas.com/v1/areas/constituency/2024-07-uk-bgc/E14001063/overlap?place=localAuthority/2024-05-uk-bgc/E07000089"Example response200 { "apiVersion": "v1", "atlasRelease": "sha256:5c4aa4529cbfbd5e4c844c55cddba1ef04a7bf76f3eaa085a357fff401af6d0c", "data": { "first": { "id": "constituency/2024-07-uk-bgc/E14001063", "geography": "constituency", "boundaryRelease": "2024-07-uk-bgc", "code": "E14001063", "name": "Aldershot", "areaM2": 57138472, "geometry": { "input": "boundaries/constituency/2024-07-uk-bgc/Westminster_Parliamentary_Constituencies_July_2024_Boundaries_UK_BGC_-8097874740651686118.geojson", "inputHash": "sha256:d3ac7aea554e63864a030baf6b5b2069cb8b1870e16a611ae21df6ad23b04383", "sourceCrs": "EPSG:4326" } }, "second": { "id": "localAuthority/2024-05-uk-bgc/E07000089", "geography": "localAuthority", "boundaryRelease": "2024-05-uk-bgc", "code": "E07000089", "name": "Hart", "areaM2": 215399269, "geometry": { "input": "boundaries/local-authority/2024-05-uk-bgc/Local_Authority_Districts_May_2024_Boundaries_UK_BGC_-6307115499537197728.geojson", "inputHash": "sha256:a54c16257bac529d380d7f9e9a3449186fda563ee426e565153a08e60d4afa3a", "sourceCrs": "EPSG:4326" } }, "relation": "overlaps", "overlap": { "areaM2": 18055366, "shareOfFirst": 0.315993, "shareOfSecond": 0.083823, "pieceCount": 1, "widestPieceWidthM": 1486 }, "publishedRelationships": [ { "relation": "overlaps", "crosswalk": { "id": "constituency-2024-07-uk-bgc-to-local-authority-2024-05-uk-bgc-area-overlap", "method": "area-overlap", "quality": "derived", "weighting": { "status": "provided", "basis": "area", "normalisation": "per-source" }, "href": "/v1/crosswalks/constituency-2024-07-uk-bgc-to-local-authority-2024-05-uk-bgc-area-overlap" }, "overlap": { "areaM2": 18055366, "shareOfArea": 0.315993, "shareOfCounterpart": 0.083823 } } ], "method": { "sliverWidthM": 100, "minimumCoverage": 0.99, "areaProjection": "EPSG:6933", "clipping": "polygon-clipping@0.15.7", "area": "Ellipsoidal, through EPSG:6933, an equal-area projection on the WGS 84 ellipsoid, so no correction is applied. A piece's width is twice its area over its perimeter." } }, "meta": { "nextCursor": null } }This measures the published generalised boundaries and isn't an official statement of how the areas relate. Any published crosswalk between them is listed in
publishedRelationships.
Going further
To move a measure onto another set of areas, such as ward counts up to councils, see Crosswalks.
get/data/{measure-id}/rankingsRank areasget/data/{measure-id}/compareCompare two areasget/areas/{geography}/{release}/{code}/neighboursList neighbouring areasget/areas/{geography}/{release}/{code}/overlapMeasure how two areas overlap