Hägerstrand Time-Space Cube


Hägerstrand time-space cube with R


With the rgl package it’s possible to interact with the 3d visualization of the timespace tracks.

Code example:
plot3d(lon,lat,timedate, xlim=range(lon), ylim=range(lat), zlim=range(timedate), ticktype=”detailed”, xlab=”longitude”, ylab=”latitude”, zlab=”Date”, col= as.POSIXlt(daten[,”Date”])$mday, type=”l”, main=plottitle)

In the posted example individual waypoints were added by drawing vertical lines.

6 Responses to “Hägerstrand Time-Space Cube”

  1. markheckmann Says:

    this looks really nice! It would be great though, if your code was reproducible, so anyone interested can play around with it on their own computer…

  2. Benedikt Orlowski Says:

    Thank you for your interest. This type of visualization is not a big deal. Just install the rgl package and import some gps trackdata a cvs file. The tracks timestamps should be merged (Time+Date) to a timedate format which is possible with the timedate package. You can also take any other data with 3 dimensions like underground earthquake coordinates. For further questions you can contact me any time.

    • Arielle Says:

      Hi, you posted this a long time ago so I’m not sure if you’ll respond. I’m dabbling in R for the first time and am trying to create a 3d plot like this. Could you break down your code further? Where do I reference my csv file?

  3. […] had mentioned the ideas of geographer Torsten Hägerstrand mapping location against time (see https://geolabs.wordpress.com/2010/11/30/hagerstrand-timespacecube/ for an example). In the digital age Hägerstrand’s map would need a new axis – location in […]

  4. Marion Says:


    thanks a lot for this nice plot! I was wondering if it was possible to add a shape file at the “bottom” of the cube to delineate cities?
    More generally, are they any examples of this plot3d customization? Like plotting arrows despite of lines, giving a weight to individuals, etc?

    Thanks a lot for your answer,

    • Benedikt Orlowski Says:

      You could add the outlines/shape of your city as points to the gps dataset and set their date/time to zero respectively to the first timedate of your dataset. You could just alternatively add the points/lines of your city by an additional plot3d command. In both cases, the city shape has to be somehow converted into points or lines that can be interpreted by the plot3d command. Alternatively just add the city map with Photoshop afterwards.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: