# Get official boundaries and the figures that go with them, by name and year

Ask for a named set of official areas in a named edition, add the census figures and places that belong on them, and get the source, date and licence of each.

Video: Get official boundaries and the figures that go with them, by name and year (1 min 22 s): /images/docs/videos/official-boundaries-and-reference-data.mp4

## Best for

Analysts, planners, researchers and anyone who has to report by area. Figures only line up with shapes from the same edition: census counts belong on the areas they were published for, because boundaries are redrawn between censuses and, for wards, between elections. You end up with the official areas, with their codes and names, the figures joined to them, and a note of where each part came from, ready to map, join to your own table or analyse.

**The example in this guide** uses no file. Mapstack fetches everything itself: London's electoral wards in the 2022 edition, the set the Office for National Statistics (ONS) publishes Census 2021 ward figures for, with their official codes and names, and the Census 2021 usual resident population of each.

## What you need

- **The name of the areas and the year or edition,** as precisely as you know it. If you only know the country and the level ("the districts of Kenya"), say that, and ask which edition it used.
- **A Free, Creator or Creator Max seat.**

## Before you start

- **Name the edition.** An edition or year in the ask is followed and stated back. Leave it out and Mapstack chooses, and says which it chose.
- **Official statistics are not held for every country.** Census figures come from an open-data release covering most of Europe and North America, Australia and New Zealand, and a selection of other countries. See [Census figures and statistics](/docs/find-data/census-and-statistics).

## The prompt

> I need London's 2022 ward boundaries with the official ONS codes and names. Tell me which edition you used and where it came from.

## What to expect

1. **Mapstack finds the boundaries and says where they came from**

   It looks in your workspace and the Community Library first, then at official sources, and states the edition it used and the coordinate system of the shapes. In the example: 680 areas, London's 679 wards and the City of London, which the ward figures treat as one area. Each has its official 9-digit code (E05 for a ward) and name, and the borough it sits in, with that borough's code.

   > **Tip:** The parent areas come with it. Each area carries the codes and names of the larger areas it sits in, so a ward-to-borough lookup is one ask: "a table of ward code and name with borough code and name".

   Edition matters most for wards. Many London boroughs redrew their wards for the 2022 elections, so a ward table from before then will not line up with these shapes, even where the names look the same.

2. **You add the figures for the same areas**

   > Now add the Census 2021 usual resident population for each ward, and tell me the total.

   Mapstack fetches the census table for the same edition and joins it on the area code, so each area gets its own figure. In the example: the 680 areas with their usual residents from Census 2021 table TS001, from 3,955 in Abbey, Barking and Dagenham, to 21,981 in Hendon, Barnet, and a total of 8,799,716.

   ![Example: London's 2022 wards coloured by Census 2021 usual residents, with Lansbury in Tower Hamlets selected to show its ward code, borough and borough code.](/images/docs/official-boundaries-and-reference-data/residents-by-ward.jpeg)

   The dataset opens on a map. Select an area to see its code and figures; to colour it by a different column, choose it under **Display**.

3. **You check the total against the published figure**

   Check figures the way you would a colleague's: against the total the statistics office publishes, and for areas with no figure.

   > Does the population total match the ONS published Census 2021 figure for London? Are any wards missing a population or showing zero?

   In the example no ward is missing a figure or shows zero. The ONS publishes 8,799,728 usual residents for London, 12 more than the wards add up to: small-area counts are adjusted slightly to protect privacy, so they need not add up exactly to the published total. Look the published figure up yourself when it matters.

4. **You add places and count them by area**

   > Find all the schools in Tower Hamlets as well, and count how many fall in each ward.

   Places come from Overture Maps, an open map of places and businesses, searched inside the outline of the place you name. Mapstack merges listings of the same place, leaves out closed ones, and counts what is left into your areas. Areas outside the outline count zero, and Mapstack says so.

   Each place carries a confidence, and a listing can be a school in name only (a tutor, a weekend class), so open the places dataset and look before you rely on a count.

5. **You get the source, date and licence of each part**

   Ask for them, and Mapstack lists every input with its source, release and licence. In the example: the ward boundaries and the population from the ONS under the Open Government Licence, and the schools from Overture Maps' October 2026 release. Put these in your credits.

## Make it your own

> What source, date and licence is each of these from?

## Common questions

**Which edition did it use?**

Mapstack says in its reply; read that line before you join anything to the areas. To get a particular edition, name it with its year, for example "London's 2022 ward boundaries".

**Why doesn't the total match the published figure?**

Small differences are normal: small-area counts are adjusted to protect privacy, and some published totals also count people who belong to no small area. In the example the gap was 12 in about 8.8 million. A large gap means areas are missing figures; ask how many have none.

**Where do the places come from, and can I rely on the count?**

From Overture Maps, an open map of places, searched inside the outline of the place you name, so areas outside that outline count zero. Each place carries a confidence: ask how many were low confidence, and open the places dataset to look before you rely on a count.

**Can I get a lookup table between levels?**

Not as a separate file. Each area carries the codes and names of the larger areas it sits in, so ask for the table with those columns.

## Related

- [Data Mapstack can find for you](https://mapstack.io/docs/find-data/data-mapstack-finds.md)
- [Get census and official statistics](https://mapstack.io/docs/find-data/census-and-statistics.md)
- [Count and summarise by area](https://mapstack.io/docs/answers/count-and-summarise-by-area.md)
- [Join your table to area boundaries and map it](https://mapstack.io/docs/guides/join-your-table-to-areas.md)
