MapBees logoMapBees

Blog

How mixed: the Simpson diversity index, explained simply

Forty restaurants that are all Italian and forty split across six cuisines are the same forty on a plain count. 'How mixed' (the Simpson index) tells them apart. Here it is, worked through with Italian, Indian, Chinese, Thai, Mexican and Lebanese restaurants in London.

Formula seriesBeginner friendlyLondon example

Forty restaurants can mean two very different streets

Picture two London streets, each with forty restaurants. On the first, thirty-seven are Italian. On the second, they are split more or less evenly between Italian, Indian, Chinese, Thai, Mexican and Lebanese. A count says these streets are the same. Anyone who has walked down both knows they are not.

How mixed is the number that tells them apart. It answers a wonderfully concrete question: if you picked two restaurants here at random, how likely is it that they are different kinds? On the Italian street, hardly ever. On the mixed street, nearly always. The field calls this the Simpson diversity index, and it runs from 0 (one kind only) to 1 (as mixed as your set of kinds can be).

How mixedthe field's term: Simpson diversity index

How mixed six cuisines are - Italian, Indian, Chinese, Thai, Mexican and Lebanese - within a 10-minute walk. Yellow neighbourhoods have a genuinely varied food scene; purple ones lean on one cuisine.

Why we chose cuisines

Variety only makes sense for a set of kinds, and cuisines are a set everyone understands. London's place data lists every restaurant under its cuisine, so picking six well-known ones gives a question a café owner, a landlord or a curious resident can all read: is the food scene here varied, or is it one thing?

The same map works for any set - kinds of shop on a high street, kinds of bar in a nightlife district, kinds of building in a block. Cuisines are just the example that needs no explaining.

Switching it on

Variety is its own row in the Map type picker. Choose the map first and then fill it: an empty Variety map simply waits for the kinds you want it to compare.

Where to click

  1. Map type
  2. Variety
  3. Tick 6 cuisines
  4. Measure as: How mixed
Variety selected in the picker. It sits under 'How much' rather than 'Compared with', because a variety index is a number in its own right - nothing is being compared with an average.

The one moment that row greys out is when you arrive with exactly one metric already chosen. Variety is a question about a set, and one kind is not a set - so the picker says so in place, “Pick two or more kinds: variety is the mix between them”, and ticking a second kind lights it up again.

Six cuisines on the Variety map, measured as 'How mixed'. There is no 'Count as' row at all here: a variety index is already a share of the set, so there is nothing left to divide it by.
'Measure as' offers the two indices and nothing else. Adding the kinds together is not one of its answers - that is the Amount map, one row up in the picker.

We read the set within a 10-minute walk because a single small area rarely holds more than a restaurant or two, and two restaurants cannot be very mixed. Over a neighbourhood the index has enough places to say something. The walk post explains that setting.

Reading the map

The legend deliberately shows words at its ends rather than 0 and 1. A value of 0.14 is true and meaningless; “One kind of place” is what it means.

The ramp runs from 'One kind of place' to 'Very mixed'. Areas with none of the six cuisines within reach show as no information, because there is nothing to be mixed.
Hovering an area gives the index for that neighbourhood. The closer to 1, the more evenly the six cuisines share the restaurants within a walk.

The maths, honestly

Take each kind's share of the total, square it, add the squares up, and subtract from 1. Squaring is what makes a dominant kind weigh so heavily: 92.5% squared is 0.856, while four shares of 25% squared add up to just 0.25.

Two streets, forty restaurants each
Street A - 37 Italian, 1 Indian, 1 Chinese, 1 Thaisum of squared shares = 0.857
0.925² + 3 × 0.025²
Street A - How mixed
1 − 0.857 = 0.14
Street B - 10 each of four cuisinessum of squared shares = 0.25
4 × 0.25²
Street B - How mixed
1 − 0.25 = 0.75

0.75 is the maximum four evenly-split kinds can reach, which is why the app says '1 is as mixed as this set can be' rather than promising a 1 for every set.

Same formula, two industries

Competition regulators use the Herfindahl index (HHI) to decide whether a market is concentrated. It is exactly 1 − Simpson, scaled to 10 000. Two fields invented the same sum independently.

Already in the census data

MapBees' nationality diversity fields are Simpson indices computed the same way, so 'How mixed' on cuisines and 'nationality diversity' from the census are one definition, not two.

How mixed versus How even

Both rise with variety, but they answer slightly different questions. How mixed (Simpson) asks how likely two random picks differ and is forgiving of a few rare kinds. How even (Shannon) asks whether every kind gets a fair slice and punishes a dominant kind harder. The How even post runs the same six cuisines through that formula.

See how mixed London's cuisines are

The whole idea, in four lines

  • How mixed = the chance two things picked at random here are different kinds. That is the Simpson index: 1 − Σ share².
  • It needs a set: tick two or more kinds and the 'Measure as' row appears.
  • Forty Italian restaurants score near 0; forty split across six cuisines score near 1. A count cannot tell them apart.
  • The legend speaks in words - 'One kind of place' to 'Very mixed' - because 0.14 on its own means nothing.
  • Read it within a 10-minute walk so each neighbourhood has enough places for the index to mean something.

Quick questions

What does the Simpson index measure?

The chance that two things picked at random from an area are different kinds. 0 means only one kind is present; the closer to 1, the more evenly the kinds are mixed. MapBees calls it 'How mixed'.

How do I map cuisine variety in MapBees?

Open the Map type picker and choose 'Variety', tick two or more kinds in the metric picker (for example six cuisines), then set 'Measure as' to 'How mixed'. The map colours each area from 'One kind of place' to 'Very mixed'.

Why is the Variety map sometimes greyed out?

Only when exactly one metric is selected: variety is a question about a set, and one kind is not a set. The picker lists it with that reason written underneath, and ticking a second kind makes it selectable. From an empty map you can pick Variety straight away and choose the kinds afterwards.

What is the difference between 'How mixed' and 'How even'?

Both rise with variety. 'How mixed' (Simpson) asks how likely two random picks differ, and is forgiving of a few rare kinds. 'How even' (Shannon) asks whether the kinds are spread evenly, and punishes one dominant kind harder.

Can I divide a variety index per resident?

No. A variety index is already a 0-1 proportion, not a count, so dividing it again would be meaningless. The Variety map therefore has no 'Count as' row at all.

See it on a real map

The best way to understand the score is to play with it. The full app is on a free tier, with no sales call.

About the author

Tinkal Gogoi(LinkedIn profile, opens in a new tab)Founder & Location Data Engineer

Builds MapBees's location-intelligence pipeline end to end — census and Overture Maps ingestion, H3 hex scoring, and the map interface — and writes the methodology behind every number on the site.