Skip to content
Minute Campus.

How real companies do itLesson 081 min

Why does Uber divide your city into hexagons?

Uber sorts a city's riders and drivers into cells and counts what is in each one, so it can compare supply and demand and set prices. With squares, a neighbour beside you is closer than one on the corner. With hexagons, all six neighbours are the same distance away. Uber published this grid in 2018 as H3.

Remember

A good grid turns a hard map question into a counting question.

Sources

Checked at the source.

Every claim in the lesson was checked against these before it was recorded.

  1. 1H3: Uber's Hexagonal Hierarchical Spatial IndexUber Engineering · 27 June 2018 · read 4 Oct 2026H3 is Uber's grid for pricing and dispatch; hexagons have one distance to their neighbours, squares have two.

Transcript

The lesson, word for word.

Read it at your own pace, or search the page for a term.

Uber divides every city into hexagons. Why not squares? Uber needs to know where riders are asking for cars and where drivers are free. Millions of exact map points are too many to reason about. So it sorts them into cells and counts what is in each one: requests here, drivers there. That is how it compares supply and demand across a city and sets prices. But the shape of the cell matters, because people move. With squares, a neighbour beside you is closer than a neighbour on the corner. Two different distances. With hexagons, all six neighbours are the same distance away. So spreading out from one cell to the next works the same in every direction. Uber published this grid in twenty eighteen, under the name H three. The lesson: before you search a map, turn it into a grid. A good grid makes a hard question a counting question.

Questions? Comment on the lesson on YouTube

New lessons every day.

Follow Minute Campus where you already scroll.