This is the online home of Geocomputation with R, a forthcoming book with CRC Press.


Inspired by bookdown and the Free and Open Source Software for Geospatial (FOSS4G) movement, this book is open source and publicly available. This approach encourages contributions, ensures reproducibility and provides access to the material worldwide.

The book explains how to undertake a range of geographic techniques from R and is divided into the floowing parts:

  1. Foundations, aimed at getting you up-to-speed with geographic data in R.
  2. Extensions, which covers advanced techniques.
  3. Applications, to real-world problems.

The online version of the book is hosted at geocompr.robinlovelace.net and kept up-to-date thanks to Travis, which provides information on its ‘build status’ as follows:

Build Status

The version of the book you are reading now was built on 2018-08-16 and was built on Travis.

How to contribute?

bookdown makes editing a book as easy as editing a wiki, provided you have a GitHub account (sign-up at github.com). Once logged-in to GitHub, click on the ‘edit me’ icon highlighted with a red ellipse in the image below. This will take you to an editable version of the the source R Markdown file that generated the page you’re on:

To raise an issue about the book’s content (e.g. code not running) or make a feature request, check-out the issue tracker.


To reproduce the book, you need a recent version of R and up-to-date packages, which can be installed with the following command (which requires devtools):

To build the book locally, clone or download the geocompr repo, load R in root directory (e.g. by opening geocompr.Rproj in RStudio) and run the following lines:

Further details can be found at github.com/Robinlovelace/geocompr.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.