Publications by James
Clipping a Surface By a Polygon
Background: A common function in standard GIS software enables users to create a raster surface and extract values or clip it based on a set of polygons. This may be used in cases where you want analysis to be constrained to within a town’s boundaries or a coastline. This tutorial will outline how to create a surface using kernel density estima...
1088 sym 4 img
Maps with ggplot2
The ggplot2 package offers powerful tools to plot data in R. The plots are designed to comply with the “grammar of graphics” philosophy and can be produced to a publishable level relatively easily. For users wishing to create a good map without too much thought I would recommend this worksheet. For those without their own shapefiles who rely ...
1086 sym 4 img
Installing rgdal on Mac OS X
After running a spatial data analysis with R session today, it became apparent that there are one or two teething problems installing the important rgdal package on Mac OS X operating systems. The usual install.packages(“rgdal”) won’t work. My colleague Jon Reades did some digging around to find this solution. I have tested it and it seems ...
2277 sym 2 img
Exporting KML from R
Google Earth has become a popular way of disseminating spatial data. KML is the data format required to do this. It is possible to load almost any type of spatial data format into R and export it as a KML file. In my experience R seems much quicker at doing this than many well-known GIS platforms, such as ArcGIS. The worksheet below explains how....
1016 sym 4 img
Boris Bikes/Barclays Cycle Hire Average Journey Times
The visualisation above shows the average relative duration of Boris Bikers’ weekday journeys over a 4 month period at hourly intervals. For each time step the average journey time (in seconds) from each docking station has been calculated.This information is interesting because it shows the preference for short journeys around the City of Lond...
2029 sym
R interface to Google Chart Tools
Hans Rosling eat your heart out! It is now possible to interface R statistics software to Google’s Gapminder inspired Chart Tools. The plots below were produced using the googleVis R package and three datasets from the Gapminder website. The first shows the relationship between income, life expectancy and population for 20 countries with the hi...
2015 sym
OpenData + R + Google = Easy Maps
The release of the R package “googleVis” has made the production of interactive maps through Google’s Chart Tools a simple task. Ignoring the some basic data manipulation the below map was produced with these two lines of code: library(googleVis) Geo=gvisGeoMap(Map, locationvar=”Country”, numvar=”Percentage”, options=list(height=350...
694 sym 2 img
Mapping London’s Population Change 1801-2030
Buried in the London Datastore are the population estimates for each of the London Boroughs between 2001 – 2030. They predict a declining population for most boroughs with the exception of a few to the east. I was surprised by this general decline and also the numbers involved- I expected larger changes from one year to the next. I think this ...
1695 sym 4 img
Global Migration Maps
Migrations of people have existed for millennia and occur at a range of scales and time-periods (from small-scale journeys to work through to intercontinental resettlement). As a geographer I have long been interested in these and thought it was about time I mapped them! Using data from the Global Migrant Origin Database (thanks Adam for the ...
2578 sym 4 img
Coming of Age: R and Spatial Data Visualisation
I have been using R (a free statistics and graphics software package) now for the past four years or so and I have seen it become an increasingly powerful method of both analysing and visualising spatial data. Crucially, more and more people are writing accessible tutorials (see here) for beginners and intermediate users and the development of p...
3516 sym 6 img