This project focuses on classifying soil texture using field sample data and generating spatially continuous maps using spatial interpolation (Kriging & IDW) techniques in R. The results are compared with the World Soil Grids prediction raster dataset to assess spatial variability and map accuracy.
How do USDA soil texture classes derived from field soil samples differ from those estimated by the World Soil Grid, and what spatial patterns emerge when using different interpolation techniques (Kriging & IDW) in R?
Field-derived soil texture classes will show finer spatial variation than World Soil Grid predictions, with higher disagreement in areas of micro-scale heterogeneity.
To classify soil texture using the USDA texture triangle, map spatial variability using interpolation techniques, and compare results with World Soil Grids data.
- Sand (%), Silt (%), Clay (%)
- Coordinates (WGS84)
- Format: CSV / XLSX
- Sand, Silt, Clay (5-15 cm depth)
- Resolution: 250 m
- Format: GeoTIFF
- Shapefile defining the project boundary (Jaranwala, Pakistan)
# Soil-Texture-Mapping/
│
├── README.md # Project overview
├── LICENSE # MIT license
├── .gitignore # Ignored files
│
├── Data/
│ ├── Raw/ # Original datasets (CSV, shapefiles)
│ └── Processed/ # Cleaned/normalized data/raster files
│
├── Requirements.txt # R packages list & data requirements
│
├── Scripts/
│ ├── 01 Data_Cleaning.R # Data preprocessing
│ ├── 02 Classification.R # USDA soil texture classification
│ └── 03 Mapping.R # Spatial Interpolation (Kriging & IDW) & Mapping
│ # USDA Soil Texture & Comparision
│ # SoilGrids data USDA texture classification & mapping
├── Outputs/
│ ├── Figures/ # Generated maps
│ └── Tables/ # Classification results
│
└── Documents/
└── Final_Report.qmd # Quarto analytical report- Clean and standardize soil sample data
- Classify soil texture using soiltexture package
- Interpolate sand/silt/clay using IDW & Kriging
- USDA classification and Mapping
- Compare with World Soil Grids data
- Generate maps and summary tables
1. Install required packages:
# source("requirements.txt")2. Run scripts in the following order:
01_Data_Cleaning.R02_Classification.R03_Mapping.R
3. Render the Quarto report:
# Quarto render Documents/Final_Report.qmdThis project demonstrates that interpolated soil texture maps generated from field samples (Kriging and IDW, 250 m) reveal finer spatial variability than the global SoilGrids product. While SoilGrids offers a consistent regional baseline, the interpolation methods capture local heterogeneity reflected in measured texture class differences. This underscores the value of field data and suitable spatial interpolation when high-resolution or site-specific soil information is needed.
This project was developed with valuable support and inspiration from several open-source tools and data providers. The core code flow builds upon the excellent soiltexture package by Julien Moeys. Additional inspiration was drawn from the ggsoiltexture project of Sara Acevedo. I also acknowledge all other R packages that are used in building this workflow. Special thanks to the global SoilGrids (250 m) dataset for providing essential soil information used in this project. I also thank AI-assisted tools for helping me overcome challenges and deepen my understanding throughout this project.
Noman Ahmad
Doctorate in Agricultural and Natural Sciences
AGP3141 – Environmental Data Visualization in R
Date: Spring 2025
Linkedin; ResearchGate; ORCiD


