← Back to Home

GGR444 · Teaching examples

Spatial vs space-time analysis

Three interactive walkthroughs built on the same question: what does a spatial analysis miss, and what becomes visible once time is treated as a dimension rather than a filter? Each one moves step by step from the familiar map view to a space-time view of the same data.

The examples are self-contained pages with interactive Plotly figures. They work best on a laptop or desktop screen.

01
6 steps

What is a line on a map hiding?

One person, one day, one GPS track

A single 24-hour GPS trajectory, first drawn the usual way as a line, then replayed in time, lifted into a space-time path, and finally joined to land use and points of interest so every stop has a name and every move has a mode.

  1. 1 A trajectory drawn the usual way
  2. 2 Add time: order, direction, stops
  3. 3 The space-time path
  4. 4 Speed: derived, not measured
  5. 5 Spatial context: what is at each stop?
  6. 6 From a line to a story
Open example
02
7 steps

From 400 phones to one place

Many trajectories, one day, and what a place can learn from them

Four hundred people carry a phone for one day. Split each day into stays and trips, join the stays to places and census tracts, then flip the unit of analysis from the person to the place: who visits, where they come from, and where they go next.

  1. 1 One day of location data for a city
  2. 2 One person: break the day into stays and trips
  3. 3 Everyone: stays, in order
  4. 4 Join the stays to places
  5. 5 Flip it around: look at one place
  6. 6 Who visits: home tracts and the census
  7. 7 Where they came from, where they went next
Open example
03
6 steps

Does time change the answer?

Spatial vs space-time clustering

One year of incident reports across a city. DBSCAN on x and y finds the hotspots, then the same points are watched month by month and stacked into a space-time cube. ST-DBSCAN gives a different answer, and the generating process shows which one was right.

  1. 1 Where are the hotspots?
  2. 2 Spatial clustering: DBSCAN on x and y
  3. 3 Same points, one month at a time
  4. 4 The space-time cube
  5. 5 Space-time clustering: ST-DBSCAN
  6. 6 Same data, two answers
Open example