Foreword (2nd Edition)

Writing books about open source data science software that constantly changes in uncontrolled ways is a brave undertaking: it feels like running a race while someone else constantly moves the finish line. This second edition of Geocomputation with R is timely: it not only catches up with many recent changes, but also embraces new R packages, and new topical developments in the computing landscape. It now includes a chapter on raster-vector interactions, discussing the package terra which is replacing package raster for raster (and vector) data processing. It also keeps up with the tmap package for creating high quality maps, which is completing a full rewrite cycle.

Besides updating the contents of this book, the authors have also been very active in helping to streamline and focus those changes in software by extensively testing it, helping improve it, writing issues and pull requests on GitHub, sharing benchmark results, and helping to improve software documentation.

The first edition of this book has been a great success. It was the first book to popularize spatial analysis with the sf package and tidyverse. Its enthusiastic tone reached a wide audience, and helped people at various levels of experience solving new problems and moving to their next level. Being available entirely freely online in addition to the printed volume gave it a large reach, and enabled users to try out the presented methodology on their own datasets. In addition to that, the authors have encouraged the readership to reach out by ways of GitHub issues, social media posts, and discussions in a discord channel. This has led to 75 people contributing to the book’s source code in one way or the other, including several providing longer reviews or contributing full sections, including on Cloud-optimized GeoTIFFs, STAC and openEO; the sfheaders package; OGC APIs and metadata; and the CycleHire shiny app. On discord it has led to lively and spontaneous discussions in threads that include topics ranging from highly technical to “look what I built”.

Beyond this, the authors have initiated the companion volume Geocomputation with Python, stressing that geocomputation happens with data science languages, and is by no means restricted to one of them. Geocomputation is on the rise, and as part of fostering a growing geocomputation community, writing books like this one is indispensible.

Edzer Pebesma

Münster, May 2024