Welcome to geocompr, the website of our forthcoming book with CRC Press.


Inspired by the bookdown R package we are developing this book in the open. We decided to make the book open source to encourage contributions, ensure reproducibility and provide access to the material as it evolves.

We’re developing the book in 3 main phases. We’re in phase 1 and focussed on the first 5 main chapters, which we aim to be complete by September. Drafts of other chapters will be added to this website as the project progresses.

The latest version is hosted at robinlovelace.net/geocompr. This website is kept up-to-date thanks to Travis, a continuous integration (CI) service. Travis automatically rebuilds the book and finds bugs by reporting the ‘build status’ after every update. Currently the build is:

Build Status

The version of the book you are reading now was built on 2017-09-14 and was built locally. bookdown makes editing a book as easy as editing a wiki. To do so, just click on the ‘edit me’ icon highlighted in the image below. Which-ever chapter you are looking at, this will take you to the source R Markdown file hosted on GitHub. If you have a GitHub account, you’ll be able to make changes there and submit a pull request. If you do not, it’s time to sign-up!

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. The following code should install the required packages:

if(!require(devtools)) {

To build the book locally, clone or download the repo and run the following line from the project’s root directory:

bookdown::render_book("index.Rmd") # to build the book
browseURL("_book/index.html") # to view it

For further details see the book’s GitHub page at Robinlovelace/geocompr.