Modified 9 Jan 2024; Added by Chrow Khurshid
Guide

Data preparation for Digital Soil Mapping


This jupyter notebook shows how to process and prepare input data for digital soil mapping (DSM) using the statistical software R. The processing steps are illustrated with a sample dataset from North Macedonia. The tutorial consists of three parts:

  • Chapter 1 Point data : loading and processing a point dataset.
  • Chapter 2 Covariates: loading and processing a stack of gridded covariate (GIS) layers.
  • Chapter 3 Regression matrix: creating a regression matrix, which is a data object that is used as input to fit a statistical DSM model.

These parts can be accessed via the links in the menu on the left side. Each part has its own R script file. These scripts are made available with this tutorial. You can open these in RStudio and run the code from there. Hence, it is not necessary to copy the code from this tutorial to R!

Note that the three parts must be run in sequence. Output objects generated in part 1 and part 2 are used as input for part 3.

After completing this tutorial you will be able to:

  • load data tables and GIS raster (GeoTiff) files in R.
  • carry out a number of common data processing steps.
  • convert tabular objects to spatial data (and vice versa).
  • mask and project a covariate stack.
  • extract raster values at locations of data points.
  • create a regression matrix.

Publication details
Author
Bas Kempen & Giulio Genova
Publisher
Year of publication
2024
Language
English
Format
weblink