Where are the hotspots?
One year of incident reports across a 10 km × 10 km city. Each dot is one incident. Everything you will see is the same dataset, looked at in different ways.
The dataset
Columns: x_km, y_km, day. That is all a clustering algorithm gets.
The data is synthetic and was generated with known patterns, revealed in Step 6.
Spatial clustering: DBSCAN on x and y
DBSCAN finds dense regions: a point is a core point if at least minPts neighbours lie within radius ε. Clusters grow from core points; everything else is noise.
Parameters
Three clear hotspots. The map looks convincing. A report could be written from this.
Same points, one month at a time
Colours are still the 2D DBSCAN labels from Step 2. Press play and watch what each "hotspot" does over the year.
What to watch for
- Cluster 1 lights up in February, disappears, then comes back in October. Is it one hotspot or two events?
- Cluster 2 is not a place at all. It moves north from June to August.
- Cluster 3 is there every single month, at the same low rate.
- In July, look at the south-west. A cloud of "noise" appears together and vanishes a week later.
The 2D map summed the whole year into one picture. Every one of these stories was flattened away.
The space-time cube
Put time on the vertical axis. x and y are the map; height is the day of year. Drag to rotate. Now every pattern from the animation is visible at once.
Reading the cube
- A vertical column is a place that is busy all year (chronic).
- Two separate blobs stacked on the same x, y are two events at one site.
- A diagonal streak is a hotspot that moves.
- A flat, wide disc is a short burst spread over a district.
2D DBSCAN sees the cube only from directly above: all of these project onto the map as "a dense area", or, for the flat disc, as nothing at all.
Space-time clustering: ST-DBSCAN
Same idea as DBSCAN, but with two radii. A neighbour must be within εspace and within εtime. The neighbourhood is a cylinder in the cube, not a disc on the map.
Parameters
The time window is a dial
- ±3 days: too narrow. The moving hotspot shatters into fragments.
- ±7 days: the recurring site splits in two, the burst appears, the chronic site is gone.
- ±21 days: the chronic site comes back as a cluster.
- ±60 days: too wide. Background floods in and clusters merge.
Why is εspace larger here than in Step 2? Within a two-week window the background is thin, so the same radius holds far fewer background points. Parameters are always set relative to the density of the space you search in.
Same data, two answers
Left: what the 2D analysis reported. Middle: what the space-time analysis reported. Right: how the data was actually generated.