Hilbert Curves Turn Battle Locations Into a Timeline
A map shows where battles happened; a timeline shows when. A Hilbert curve brings both dimensions into one view, making patterns across roughly 550 historical battles in the UK easier to spot. The data came from Wikidata through a SPARQL query, and the resulting chart shows how a mathematical path can make a geographic dataset more legible over time. That matters because location and chronology often answer different questions: a map can show concentrations, while a timeline can show sequences and duration. Putting them together gives readers a way to look for relationships between the two. It’s a useful analytical move, though the chart’s appearance still depends on choices made in preparing and arranging the data.
From map coordinates to a single path
The original map marks each battle with crossed swords. It hints at geographic concentrations, including activity near the historic borderlands of Wales, but the chronology is difficult to read alongside location. A cluster of markers can show that many battles occurred in an area, yet it doesn’t say at a glance whether they were close together in time or separated by long stretches. That gap is the problem the combined view tries to address.
A conventional time-versus-location chart needs to turn each two-dimensional position into a single coordinate. The approach here assigns locations along a space-filling curve: a path that winds through a grid and visits each cell once. Nearby positions along the path are guaranteed to be geographically close, though two nearby places on the map can still end up far apart on the path. That distinction is central to reading the result: the curve offers a useful ordering of places, but it can’t preserve every geographic relationship in one dimension. Similar methods typically trade some spatial fidelity for a layout that makes another comparison possible.
The example uses a Hilbert curve. At a given level, its cells can be represented as a 2n by 2n matrix, with each number marking the order in which the curve visits that location. Read the numbers in sequence and they trace a continuous route across the grid. As n grows, the grid gains more cells and the path becomes more intricate. The article’s illustration uses a 64 by 64 grid, giving the plotted locations a finer set of possible positions than a smaller grid would. More cells can help distinguish locations, but the curve’s route still shapes which places appear close in the resulting chart.
Reading the combined view
For the UK plot, the map area spans longitudes from −6 to 1.8 degrees and latitudes from 49.8 to 58 degrees. City locations provide geographic reference points, while blue lines mark grid cells that are mostly sea. The original dataset included part of Ireland, but the chosen rectangle excludes most of it. Those framing decisions help readers orient themselves, while also defining what the chart can show: the visible pattern reflects the selected area and the underlying data, rather than every battle associated with the broader region.
The plotted battles form three broad clusters that appear to correspond, from left to right, to Wales, Scotland and England. Because one axis represents time and the other follows the Hilbert path through geography, recurring events take on distinctive shapes. Battles concentrated in one place over an extended period form vertical columns; conflicts spread across a wider area appear as horizontal bands. These are visual cues, not automatic historical explanations. A column suggests duration and geographic concentration, while a band suggests wider spatial reach; interpreting either still requires knowing what events and locations the points represent.
That structure makes several historical episodes stand out. A yellow-highlighted line marks battles from the English Civil War. The purple points identify the Jacobite Rebellion, described in the article as the last major land battles in the UK. Turquoise points trace the extended English conquest of Wales, a pattern also visible on the original map. Seeing these examples in the same plot makes it easier to compare their timing and spatial distribution, although the colored marks depend on the chart’s categorization and don’t explain the events by themselves.
A green row near London collects twentieth-century battles, mostly connected with the two world wars. It includes the Battle of Britain and several naval engagements. That grouping is a reminder that the dataset combines events with different geographic character: a land battle, an air campaign and a naval engagement don’t map onto place in quite the same way. The chart doesn’t replace the geographic map, but it gives chronology and spatial spread a shared visual structure. Here’s the thing: the value lies in seeing how the dimensions interact, not in treating the plotted shape as a complete account of each conflict.
A useful view, with open questions
The technique’s strength is also its constraint: the curve preserves local proximity in one direction, but it can stretch apart locations that are close on a conventional map. The result is a way to reveal patterns, not a distortion-free translation of geography. How much the view helps will depend on the data, the grid resolution and the curve’s arrangement. This is more significant than it looks, because a striking band or cluster can invite a stronger interpretation than the coordinate transformation warrants. The map remains useful for checking where those points sit in ordinary geographic space.
The author raises two questions the example doesn’t resolve: who first used space-filling curves for dimensionality reduction, and whether there’s a best curve for a particular dataset. The article doesn’t supply answers, and the example alone can’t establish one curve as preferable in every case. That said, comparing alternative arrangements would help clarify whether a pattern comes from the historical data or from the chosen path. And this is the part most people overlook: a visualization method can make a pattern easier to notice while also influencing the form in which that pattern appears.
If you’re working with data that has both time and location, the chart offers a practical prompt: ask what each view hides, then test whether a shared representation makes the relationship clearer. You’ll still need the map, the timeline and enough context to interpret individual events. The practical takeaway is clear: when a map and a timeline each conceal part of a story, a space-filling curve can put both into the same plot. A lens, not a verdict.