This article was originally published in Geoinformatics magazine.
R is well known as a powerful, extensible and relatively fast statistical programming language and open software project with a command line interface (CLI). What is less well known is that R also has cutting edge spatial packages that allow it to behave as a fully featured Geographical Information System in the full sense of the word. In fact, some of cutting edge algorithms for image processing and spatial statistics are implemented in R before any other widely available software product (Bivand et al. 2013). Sophisticated techniques such as geographically weighted regression and spatial interaction models can be custom built around your spatial data in R. But R also works as a general purpose GIS, with mature functions for performing all established techniques of spatial analysis such as spatial selections, buffers and clipping. What is unique about R is that all these capabilities are found in a single programme: R provides a truly integrated modelling environment.
I’m presenting today on “Verification of big data for estimating retail flows”.
Slides from this presentation can be found here.
This post is based on the free and open source Creating-maps-in-R teaching resource for introducing R as a command-line GIS.
R is well known as an language ideally suited for data processing, statistics and modelling. R has a number of spatial packages, allowing analyses that would require hundreds of lines of code in other languages to be implemented with relative ease. Geographically weighted regression, analysis of space-time data and raster processing are three niche areas where R outperform much of the competition, thanks to community contributions such as spgwr, spacetime and the wonderfully straightforward raster packages.
What seems to be less well known is that R performs well as a self standing Geographical Information System (GIS) in its own right. Everyday tasks such as reading and writing geographical data formats, reprojecting, joining, subsetting and overlaying spatial objects can be easy and intuitive in R, once you understand the slightly specialist data formats and syntax of spatial R objects and functions. These basic operations are the basic foundations of GIS. Mastering them will make much more advanced operations much easier. Based on the saying ‘master walking before trying to run’, this mini tutorial demonstrates how to load and plot a simple geographical object in R, illustrating that the ease with which continuous and binned choropleth map color schemes can be created using ggmap, an extension of the popular ggplot2 graphics package. Crucially, we will also see how to join spatial and non spatial datasets, resulting in a map of where the Conservative party succeeded and failed in gaining council seats in the 2014 local elections.
I recently attended a week-long R course in Newcastle, taught by Colin Gillespie. It went from “An Introduction to R” to “Advanced Graphics” via a day each on modelling, efficiency and programming. Suffice to say it was an intense 5 days!
Overall it was the best R course I’ve been on so far. I’d recommend it to others, from advanced users to adventurous novices. Below I explain why, with a brief description of each day and an emphasis on day 2.
I was recently invited to write a book review for Applied Spatial Analysis and Policy (ASAP). The book, I conclude, “is the authoritative resource on R’s spatial capabilities” and should be of interest to many R users.
Below is a preprint of the full review, now published on ASAP’s website.
What I'm up to
Search this site!
Quote of the day
Some interesting links
The internet is awash with detritus. In the name of navigating the maze, these links highlight some more enlightened online content.
George Monbiot: investigative journalism at its best
R-Bloggers: a site endevouring to make statistics accessible and fun
Tom's bike trip: there are many 'bike trip' sites out there; this is one of the best
My presentations on Speaker Deck
TGRG website: the Transport Geography group I'm involved with
MASS profile: academic profile at Leeds
Powerstar Youtube channel: check out my videos
R-Bloggers feed: posts about R