README.md

SQIpro

Comprehensive Soil Quality Index Computation and Visualization in R

CRAN status License: GPL-3

Overview

SQIpro provides a complete, modular framework for computing the Soil Quality Index (SQI) — a single numeric score (0–1) integrating physical, chemical, and biological soil properties.

Six indexing methods

| Method | Reference | Key feature | |--------|-----------|-------------| | Linear Scoring | Doran & Parkin (1994) | Simple, equal-weight additive | | Regression-based | Masto et al. (2008) | Weights by regression coefficients | | PCA-based | Andrews et al. (2004) | Data-driven, variance-explained weights | | Fuzzy Logic | Zhu et al. (2010) | Handles uncertainty; geometric mean option | | Entropy Weighting | Shannon (1948) | Objective weights from information content | | TOPSIS | Hwang & Yoon (1981) | Multi-criteria ideal-solution distance |

Four scoring function types

"more"  — Higher is better   ▁▃▅▇█  (e.g., organic carbon)
"less"  — Lower is better    █▇▅▃▁  (e.g., bulk density)
"opt"   — Optimum range      ▁▅█▅▁  (e.g., pH 6.0–7.0)
"trap"  — Trapezoidal        ▁▅███▅▁ (explicit boundaries)

Installation

# Install from CRAN
install.packages("SQIpro")

Quick Start

library(SQIpro)

# 1. Load data
data(soil_data)

# 2. Define variable configuration
cfg <- make_config(
  variable = c("pH",  "EC",   "BD",   "OC",   "MBC",  "Clay"),
  type     = c("opt", "less", "less", "more", "more", "opt"),
  opt_low  = c(6.0,   NA,     NA,     NA,     NA,     20),
  opt_high = c(7.0,   NA,     NA,     NA,     NA,     35)
)

# 3. Score variables (0–1 transformation)
scored <- score_all(soil_data, cfg, group_cols = c("LandUse", "Depth"))

# 4. Select Minimum Data Set
mds <- select_mds(scored, group_cols = c("LandUse", "Depth"))

# 5. Compute and compare all methods
results <- sqi_compare(scored, cfg,
                        group_cols = c("LandUse", "Depth"),
                        dep_var    = "OC", mds = mds)
print(results)

Full Workflow

validate_data()  →  make_config()  →  plot_scoring_curves()
       ↓
   score_all()  →  select_mds()
       ↓
  sqi_linear()  sqi_pca()  sqi_regression()
  sqi_fuzzy()   sqi_entropy()  sqi_topsis()
       ↓
  sqi_compare()  →  sqi_anova()  →  sqi_sensitivity()
       ↓
  plot_sqi()  plot_scores()  plot_radar()  plot_sensitivity()

References

Citation

citation("SQIpro")

License

GPL-3 © Sadikul Islam



Try the SQIpro package in your browser

Any scripts or data that you put into this service are public.

SQIpro documentation built on April 20, 2026, 5:06 p.m.