Useful R Packages for Digital Soil Mapping
In addition to base R, a wide range of contributed packages are essential for implementing Digital Soil Mapping (DSM). Below, packages are grouped by key tasks:
π Note: This list is not exhaustive. It highlights packages that are commonly useful for DSM, spatial analysis, and soil modelling β but many others exist and continue to emerge.
- Soil science and pedometrics
- GIS integration and spatial processing
- Model calibration and prediction
- Mapping and visualisation
1. Soil Science and Pedometrics
-
ithir
Core datasets and functions used throughout this course for soil data handling and modelling. -
aqp
Algorithms for Quantitative Pedology β soil profile analysis, aggregation, and visualisation. -
soilDB
Interfaces with USDA soil data sources (SSURGO, NASIS, SoilWeb) β useful for U.S.-based DSM work. -
sharpshootR
Companion toaqp
β utilities for soil classification and interpretation, including taxonomy and land capability. -
Additional packages authored or used by the developer are listed on the software page.
2. GIS Tools and Spatial Processing
-
terra
Modern raster handling and spatial analysis β fast, memory-efficient replacement forraster
. -
sf
Simple Features for vector data β tidyverse-compatible spatial dataframes. -
spdep
Tools for analysing spatial autocorrelation, neighbourhoods, and dependencies β important for diagnostics and spatial structure. -
whitebox
Access to WhiteboxTools, a rich set of terrain and hydrological analysis functions. -
RSAGA
Interface to SAGA GIS β for DEM processing, hydrology, and terrain metrics. -
qgisprocess
Use QGIS processing algorithms directly from R. -
geodata
Download and prepare global raster datasets (climate, elevation, landcover) for spatial modelling.
3. Model Calibration and Prediction
-
caret
Unified interface for model training, tuning, and validation β supports dozens of algorithms. -
mlr3
Modern, modular machine learning framework with resampling, benchmarking, and workflow pipelines. -
Cubist
Rule-based regression models with instance-based corrections. -
C50
Classification trees and rule-based learners (C5.0) for pattern recognition. -
gam
Generalised Additive Models β good for flexible trend modelling. -
nnet
Single-layer neural networks and multinomial regression. -
gstat
Geostatistics β kriging, variogram modelling, and conditional simulation. -
automap
Automatic variogram fitting and kriging usinggstat
. -
randomForest
Ensemble learning via Breimanβs random forest algorithm. -
xgboost
Fast and scalable gradient boosting β popular for predictive soil modelling.
4. Mapping and Visualisation
-
ggplot2
Flexible, layered graphics system β ideal for publication-ready visualisation. -
viridis
Colourblind-friendly and perceptually uniform palettes for mapping. -
tmap
Thematic map creation using a grammar of graphics β supports both static and interactive maps. -
leaflet
Create interactive web maps directly from R. -
mapview
Quick, exploratory spatial visualisation β supports raster,sf
, andSpatRaster
. -
ggspatial
Adds scale bars, north arrows, and coordinate reference system annotations toggplot2
maps.