Predictive Soil Mapping (PSM) is based on applying statistical and/or machine learning techniques to fit models for the purpose of producing spatial and/or spatiotemporal predictions of soil variables i.e. maps of soil properties and classes at different resolutions. It is a multidisciplinary field combining statistics, data science, soil science, physical geography, remote sensing, geoinformation science and number of other sciences (Scull et al. 2003; McBratney, Mendonça Santos, and Minasny 2003; Henderson et al. 2004; Boettinger et al. 2010; Zhu et al., n.d.). Predictive Soil Mapping with R is about understanding the main concepts behind soil mapping, mastering R packages that can be used to produce high quality soil maps, and about optimizing all processes involved so that also the production costs can be reduced.

The main idea behind Predictive vs traditional expert-based soil mapping is that production of maps: (a) is based on using state-of-the-art statistical methods to ensure objectivity of maps (including objective uncertainty assessment vs expert judgment), and (b) is driven by automation of the processes so that overall soil data production costs can be reduced and updates of the maps implemented without a need for large investments. R in that sense is a logical platform to develop PSM workflows and applications, especially thanks to the vibrant and productive R spatial interest group activities and also thanks to the increasingly professional soil data packages such as the soiltexture, aqp, soilprofile, soilDB and similar.

Book is divided into sections covering theoretical concepts, preparation of covariates, model selection and evaluation, prediction and visualization and distribution of final maps. Most of chapters contain R code examples that try to illustrate main processing steps and give practical instructions to developers and applied users.

Connected publications

Most of methods described in this book are based on the following publications:

Some other publications / books on the subject of Predictive Soil Mapping include:

Readers are also encouraged to obtain and study the following R books before following some of the more complex exercises in this book:

For the most recent developments in the R-spatial community refer to and/or the R-sig-geo mailing list.


This book is constantly updated and contributions are welcome (through pull requests, but also through adding new chapters) provided that some minimum requirements are met. To contribute a complete new chapter please contact the editors first. Some minimum requirements to contribute a chapter are:

  1. The data needs to be available in majority of chapter, best via some R package or web-source.
  2. Chapter should focus on implementing computing in R (it should be written as R tutorial).
  3. All examples should be computationally efficient with not more than 30 secs of computing time per process on a single core system.
  4. Theoretical basis for methods and interpretation of results should be based on peer-review publications. This book is not intended to host primary research / experimental results, but only to supplement existing research publications.
  5. Chapter should consist of at least 1500 words and at most 3500 words.
  6. The topic of the chapter must be closely connected to theme of soil mapping, soil geographical databases, methods for processing spatial soil data and similar.

In principle, all submitted chapters should also follow closely the five pillars of Wikipedia, especially: Verifiability, Reproducibility, No original research, Neutral point of view, Good faith, No conflict of interest, and no personal attacks.


To reproduce the book, you need a recent version of R, and RStudio 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 PredictiveSoilMapping repo, load R in root directory (e.g. by opening PredictiveSoilMapping.Rproj in RStudio) and run the following lines:

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


The authors are grateful to numerous contributions from colleagues around the world, especially for the contributions by the current and former ISRIC — World Soil Information colleagues: Robert MacMillan, Gerard Heuvelink, Johan Leenaars, Jorge Mendes de Jesus, Wei Shangguan, David G. Rossiter, and many others. ISRIC is a research foundation funded primarily by the Dutch Government. The authors also grateful to the support received via the AfSIS project, which has been funded by the Bill and Melinda Gates Foundation (BMGF) and the Alliance for a Green Revolution in Africa (AGRA). Many soil data processing examples in the book are based on the R code developed by Dylan Beuadette, Pierre Roudier, Julian Moeys, Brandad Malone and many other developers. Author is also grateful to comments and suggestions to the methods explained in the book by Travis Nauman, Amanda Ramcharan, David G. Rossiter and Julian Moeys.

SoilGrids are based on numerous soil profile data sets that have been kindly contributed by various national and international agencies: the USA National Cooperative Soil Survey Soil Characterization database ( and profiles from the USA National Soil Information System, Land Use/Land Cover Area Frame Survey (LUCAS) Topsoil Survey database (Tóth, Jones, and Montanarella 2013), Africa Soil Profiles database (Leenaars 2014), Australian National Soil Information by CSIRO Land and Water (Karssies 2011; Searle 2014), Mexican National soil profile database (Instituto Nacional de Estadística y Geografía (INEGI) 2000) provided by the Mexican Instituto Nacional de Estadística y Geografía / CONABIO, Brazilian national soil profile database (Cooper et al. 2005) provided by the University of São Paulo, Chinese National Soil Profile database (Shangguan et al. 2013) provided by the Institute of Soil Science, Chinese Academy of Sciences, soil profile archive from the Canadian Soil Information System (MacDonald and Valentine 1992) and Forest Ecosystem Carbon Database (FECD), ISRIC-WISE (Batjes 2009), The Northern Circumpolar Soil Carbon Database (Hugelius et al. 2013), eSOTER profiles (Van Engelen and Dijkshoorn 2012), SPADE (Hollis et al. 2006), Unified State Register of soil resources RUSSIA (Version 1.0. Moscow — 2014), National Database of Iran provided by the Tehran University, points from the Dutch Soil Information System (BIS) prepared by Wageningen Environmental Research, and others. We are also grateful to USA’s NASA, USGS and USDA agencies, European Space Agency Copernicus projects, JAXA (Japan Aerospace Exploration Agency) for distributing vast amounts of remote sensing data (especially MODIS, Landsat, Copernicus land products and elevation data), and to the Open Source software developers of the packages rgdal, sp, raster, caret, mlr, ranger, h2o and similar, and without which predictive soil mapping would most likely not be possible.

This book has been inspired by the the Geocomputation with R book, an Open Access book edited by Robin Lovelace, Jakub Nowosad and Jannes Muenchow. Many thanks to Robin Lovelace for helping with rmarkdown and for giving some initial tips for compiling and organizing book. The author is also grateful to the numerous software/package developers, especially Edzer Pebesma, Roger Bivand, Robert Hijmans, Markus Neteler, Tim Appelhans, and Hadley Wickham, that have enabled a generation of researchers and applied projects.

Every effort has been made to trace copyright holders of the materials used in these materials. Should we, despite all our efforts have overlooked contributors please contact the author and we shall correct this unintentional omission without any delay and will acknowledge any overlooked contributions and contributors in future updates.

Data availability: All data used in this book is either available through R packages or is available via the github repository. If not mentioned otherwise, all code presented is available under the GNU General Public License v2.0.

Copyright: © 2018 Hengl et al.

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