Module 1 · Introduction to R, spatial data and soil data preparation

Digital Soil Mapping
R and RStudio basics, spatial data with terra and sf, quality control and harmonisation of the KSSL soil dataset, and building the covariate stack.

Format: 4 sessions · Level: Beginner · Runs in: SoilFER Learn lab (JupyterLab · RStudio · QGIS) · Material: SoilFER Training Manual + Training Resources

What you will learn

  • work with R and the tidyverse
  • import, check and clean laboratory and site data (KSSL, Kansas)
  • harmonise soil depths and units and apply property thresholds
  • handle vector and raster data and extract environmental covariates at soil points

Notebooks

Use the workspace your trainer picks. In a notebook, run the Setup cell first, then the cells in order.

  • JupyterLab opens the notebook in your SoilFER Learn lab, with the project, packages and data already there.
  • RStudio: the same exercises as the original R scripts. RRStudio opens the SoilFER-Training-Resources project; the scripts are in 02_scripts/module1.
Session Open in
Session 1 · Introduction to R for soil science

JJupyterLab.ipynb

Session 2 · Soil data preparation with the KSSL dataset (part 1)

JJupyterLab.ipynb

Session 3 · Soil data preparation with the KSSL dataset (part 2)

JJupyterLab.ipynb

Session 4 · Spatial analysis and covariates

JJupyterLab.ipynb

TipSee your maps

The last cell of the mapping notebooks, Explore your results, plots your maps and packs them into soilfer_outputs.zip. Open them in QGIS in your Lab (QGIS desktop), or download the zip and drop it on the Map viewer.

First time here? Read Getting started.

Back to top