Pages Menu
Categories Menu

Posted by on Apr 8, 2013 in R Spatial, Resources, Spatial Analysis | 3 comments

Starting Analysis and Visualisation of Spatial Data with R

Last week I ran an introductory workshop on the analysis and visualisation of spatial data with R. The software has become established as one of the best around for statistics and it is becoming increasingly recognised as a tool for data visualisation (I wrote about this last year, also see here) and spatial analysis. Interest in R is increasing all the time but many feel put off by its very steep learning curve. The help files are often complex and there are some slightly idiosyncratic aspects to the language you have use to get R to work. That said there is lot more help around on forums and some excellent introductory tutorials to get  you started. Here are a couple of worksheets I use to introduce the wonders of R.


The first is written by Richard Harris from the University of Bristol. You can download the worksheet here and the example data from here. I like this worksheet because it is very applied (it is using a real dataset on an important problem), it gets you working with spatial data quickly and it also offers an automated run-through of some of the more advanced stats. It provides a great general introduction to R that can be a basis for more advanced worksheets and tutorials.

ggplot2 map

The second worksheet is one that I have written as an introduction to spatial data visualisation with ggplot2 (a data visualisation package in R). Download instructions here and data here. The code takes you through some of the key functions I often use in ggplot2 to create maps. It also includes faceting which enables you to create lots of graphics as small multiples on a single page. I use this a lot for maps such as the one below of New York Twitter languages:


Here are a couple of additional worksheets from Chris Brunsdon (University of Liverpool) that may be of interest to those who want to do more advanced spatial analysis and I have a few tutorials here. I am sure there are many more good examples out there so feel free to post them in the comments.


  1. Hi James, i really appreciate the way you share this knowledge about spatial analysis using R. However, i think the usage of “gpclib” package is obsolete in the newest version of R. Do you have another explanation that are using the newest R ? thanks in advance.



  1. Beautiful Data: 5/27 | Austin+Wehrwein - […] The original tutorial by James Cheshire is found here at […]

Post a Reply

Your email address will not be published. Required fields are marked *