Close

Not a member yet? Register now and get started.

lock and key

Sign in to your account.

Account Login

Forgot your password?

R Spatial Tips  // Browsing posts in R Spatial Tips

Mapped: British, Spanish and Dutch Shipping 1750-1800

Mapped: British, Spanish and Dutch Shipping 1750-1800

I recently stumbled upon a fascinating dataset which contains digitised information from the log books of ships (mostly from Britain, France, Spain and The Netherlands) sailing between 1750 and 1850. The creation of this dataset was completed as part of the Climatological Database for the World’s Oceans 1750-1850 (CLIWOC) project. The routes are plotted from the ...

Read more...

London Cycle Hire and Pollution

London Cycle Hire and Pollution

As a cyclist in London you can do your best to avoid left turning buses and dozy pedestrians. One thing you can’t really avoid though is pollution (although I accept cyclists probably aren’t much worse off than pedestrians and drivers in this respect). To illustrate this I have taken data for 3.2 million journeys from ...

Read more...

Great Maps with ggplot2

Great Maps with ggplot2

The above map (and this one) was produced using R and ggplot2 and serve to demonstrate just how sophisticated R visualisations can be. We are used to seeing similar maps produced with conventional GIS platforms or software such as Processing but I hadn’t yet seen one from the R community (feel free to suggest some ...

Read more...

Coming of Age: R and Spatial Data Visualisation

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 ...

Read more...

Improved Tree Maps with R

Improved Tree Maps with R

“Treemaps display hierarchical (tree-structured) data as a set of nested rectangles. Each branch of the tree is given a rectangle, which is then tiled with smaller rectangles representing sub-branches. A leaf node’s rectangle has an area proportional to a specified dimension on the data. Often the leaf nodes are colored to show a separate dimension of ...

Read more...

Global Migration Maps

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 ...

Read more...

Mapping London’s Population Change 1801-2030

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 ...

Read more...

Using R to Map with Google Chart Tools

Using R to Map with Google Chart Tools

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, dataMode=’regions’)) plot(Geo) This map, although simple to produce, is nontrivial as it ...

Read more...

Exporting KML from R

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 ...

Read more...

Installing rgdal on Mac OS X

Installing rgdal on Mac OS X

******Roger Bivand has kindly just emailed me to say: “Your 2 November blog about rgdal on OSX is very misleading. The CRAN rgdal page: http://cran.r-project.org/web/packages/rgdal/index.html says all you need to know unless you need extra drivers, or already have PROJ.4 and GDAL installed. Just do: setRepositories(ind=1:2) install.packages(“rgdal”) installs rgdal with all its external dependencies satisfied. It is ...

Read more...