FlowsBook a callSign inCreate free accountSign up
Population and demographics

The population-weighted centre of a city, and why it is rarely the middle of the map

Where the middle of a city's people lies, worked out from population hexagons: the arithmetic, a made-up example, the traps, and an AI employee that finds it.

Part of the guide Location intelligence automation

By the xMap team · · 6 min read

The population weighted centre of a city is the point where its residents balance: the average position of every person, rather than the middle of its outline on a map. You find it by taking small areas with known populations, multiplying each area's position by the people living there, adding everything up and dividing by the total population. Because people cluster in some districts and leave others nearly empty, this point often sits well away from the geographic middle, and the gap is a quick, honest picture of how lopsided a city is.

This article is for planners, analysts and expansion teams who need one point that stands for a city's people: where to put a head office that staff can reach, where to hold an event, where to start a delivery zone, or simply how to describe a city's shape. It explains the arithmetic step by step with an invented example, what the point is good and bad for, the mistakes to avoid, and how to have an AI employee work it out from xMap's population hexagons.

The arithmetic, in plain steps

You need small areas, each with a position and a number of residents. xMap's population grid gives exactly that: hexagons of about 0.1 square kilometres, each with its centre and its people. Then:

  1. For every hexagon, multiply its east-west position by its population, and its north-south position by its population.
  2. Add up all the east-west products, and separately all the north-south products.
  3. Add up the populations.
  4. Divide each sum of products by the total population. The two results are the east-west and north-south positions of the centre.

At city scale you can do this directly on latitude and longitude: the weighted average latitude and the weighted average longitude give the point. Across a whole country or a continent the curve of the Earth starts to matter and the method needs more care, but for a city the simple version is accurate enough for any business decision.

A made-up example with four areas

Imagine a small town split into four blocks, with positions given in kilometres east and north of its town hall. The numbers are invented to keep the arithmetic easy to follow.

BlockKm eastKm northResidents
A001,000
B023,000
C40500
D42500

A made-up town. Each block stands in for a population hexagon.

The total is 5,000 residents. East-west: 0 x 1,000 + 0 x 3,000 + 4 x 500 + 4 x 500 = 4,000, divided by 5,000 gives 0.8 km east. North-south: 0 x 1,000 + 2 x 3,000 + 0 x 500 + 2 x 500 = 7,000, divided by 5,000 gives 1.4 km north. The population-weighted centre is at 0.8 km east, 1.4 km north.

The middle of the map, the plain average of the four blocks, is at 2 km east and 1 km north. The people's centre sits 1.2 km further west and 0.4 km further north, about 1.3 km away, pulled towards block B where most residents live. A depot placed at the map's middle would be a little further, on average, from the people it serves.

What the point is good for, and what it is not

  • Good for a meeting point. A head office, a training centre or an annual event placed near the people's centre minimises how far residents travel on average, by straight line.
  • Good for describing a city. The distance between the map's middle and the people's centre shows at a glance whether a city is balanced or tilted to one side, by a coast, a river or a newer suburb.
  • Good for comparing groups. Weight by children instead of everyone and you get the centre of a city's children; by seniors aged 60 and over, the centre of its older residents. When those points are far apart, one location will not serve both groups well.
  • Not a site in itself. The point can land in a park, a river or a rail yard. Use it to know which part of the city to search, then look for real units nearby.
  • Not a travel time. It balances straight-line distance. Roads, bridges and transit can make a point a little off the centre faster for most people.

Traps when you work it out

  • Cutting the city at the wrong edge. The answer depends on the area you include. A boundary that leaves out a large suburb drags the centre away from it, so decide first whether you mean the city proper or the whole built-up area.
  • Using residents for a daytime question. Population figures say where people sleep. For where they are in the working day, footfall is the better measure.
  • Assuming every country is covered. Population figures exist in some countries, among them France, Canada, India, Thailand, Egypt and Australia, and not in the United Kingdom or the United States.
  • Running out of hexagons. One run of Demographics returns up to 5,000 hexagons, roughly 500 square kilometres. For a large metropolitan area, draw the part you care about or split it into several areas.

Finding it with an AI employee

You do not need a spreadsheet full of hexagons. An AI employee can fetch them, do the arithmetic and put the point on a map. The guide to location intelligence automation covers how such flows fit together. A flow for a population-weighted centre:

  1. Area of interest: the city, or a district you draw on the map, such as central Paris or the area inside a ring road.
  2. Demographics: Give back set to Every hexagon, so each hexagon arrives with its centre and its residents by age.
  3. Data analyst: asked in plain words for the population-weighted centre, the plain middle of the hexagons, and the distance between them. It writes a small program, runs it on every hexagon and shows you the program it used.
  4. Show on a map: the hexagons as a heat map weighted by population, so you can see what pulled the point where it is.
  5. Email the answer and the map to your team.

Add a second question to the Data analyst, such as the centre of residents aged 60 and over, and the same run gives you both points. The Demographic profile of each city template returns each city's totals and age groups, and People per police station, block by block shows how hexagons and service points work together once you know where the people are. To turn hexagons into your own districts, read how to convert population hexagons to sales areas.

Questions

What is the difference between the centre of a city and its population-weighted centre?

The centre is the middle of its outline on the map. The population-weighted centre is the average position of its residents, so it moves towards the districts where most people live.

Can I work out the centre for one age group only?

Yes. Weight each hexagon by the group you care about, such as children aged 0 to 19 or seniors aged 60 and over, instead of everyone.

Is the population-weighted centre a good place to open a shop?

It tells you which part of a city to search, not which unit to take. The point itself can fall in a park or a river, and travel times matter more than straight lines.

Does it work for any city?

Only where population figures exist, such as cities in France, Canada, India, Thailand, Egypt and Australia. The United Kingdom and the United States are not covered.

Templates that do this

Read next

More on population and demographics · Every article · Templates

Put it to work

An AI employee in xMap Flows does this on live data, on its own timetable. Start from a template or describe it in plain words.