Spatial analysis · 4 min

Spot clusters on a map

When dots bunch together, how to find the groups properly instead of by eye.

1 / 8

Spatial analysis

Your eyes are a poor judge

People see groups in any scatter of dots, even random ones. Zoom out and two clusters merge; zoom in and one splits.

A clustering method uses a fixed rule instead, so the answer doesn't change with the zoom level or who is looking.

4 min lesson

Lesson notes

Everything from the cards above, on one page to come back to.

Your eyes are a poor judge

People see groups in any scatter of dots, even random ones. Zoom out and two clusters merge; zoom in and one splits.

A clustering method uses a fixed rule instead, so the answer doesn't change with the zoom level or who is looking.

Distance-based: who has neighbours?

One common rule, called DBSCAN: pick a distance and a minimum number of points. A point with at least that many points within that distance, itself included, is the core of a cluster. Points close to a core join its cluster.

Points that join nothing are noise: lone points with no crowd around them.

Distance 500 m, minimum 5 points: a café with four others within 500 m is a core point.

K-means: you choose how many

K-means works the other way round: you say how many groups you want, and every point is put in the group whose centre is nearest. There is no noise; every point gets a group.

It suits questions like “split our customers into 4 delivery regions”. It suits “where are the real hot spots?” less well.

In MapGO

Find clusters, in the Process tools, offers both methods. It writes a cluster_id column numbering each group and, for distance-based runs, a cluster_type column: core, edge or noise. It also colours the points by cluster.

Open Process tools

Questions

What is the difference between DBSCAN and k-means?

DBSCAN groups points that have enough neighbours within a distance and leaves lone points as noise. K-means splits every point into a number of groups you choose.

What does noise mean in clustering?

Points that belong to no cluster, because they don't have enough neighbours close by.