Tutorial: Analysing Spatial Data in R

presented by Roger Bivand


The workshop will introduce the foundation classes for spatial data provided in the sp package, and show how they make work with spatial data easier. The classes have shared interfaces to common file formats for spatial data, and a range of subsetting, plot, overlay, and sampling methods.

The workshop will let participants needing to import spatial data into R, analyse it in one or more packages, display it in graphical form, and perhaps export it from R, learn how these steps can be made conveniently and robustly. The final section will show how the new class structure makes writing custom interfaces less challenging, making R analysis functions available for a wide range of spatial data formats.


  1. Representing spatial data in R (30 minutes)
  2. Vizualising spatial data in R (30 minutes)
  3. Accessing spatial data in R (30 minutes)
  4. break
  5. Worked examples: geostatistics (30 minutes)
  6. Worked examples: disease mapping (30 minutes)
  7. Worked examples: customising spatial data classes (30 minutes)

Workshop materials:

pre-workshop notes, scripts, and data sets on Rgeo website
download and install at least the core packages from the Spatial task view.

Post-workshop follow-up on the R-sig-geo mailing list.

Back to Tutorials