Dataset and AgroMineral PCA software for soil remineralization (n = 3,000)

Published: 25 October 2026| Version 1 | DOI: 10.17632/vn9hhdznxg.1
Contributors:
Hugo Gaspar Hernandez Palma,

Description

Dataset and research software supporting the manuscript "Sustainable valorization of agrominerals: algorithmic pipeline to classify and predict soil reactivity". The dataset integrates 3,000 records from five silicate lithologies (dacite, granite, phonolite, basalt, phlogopite) across three mesh sizes (100, 200, 325), with 20 variables: elemental chemistry (SiO2, K2O, CaO, MgO), Rietveld X-ray diffraction mineralogy (quartz, feldspars, micas, other phases), grinding fineness and agronomic responses (potassium solubility, available K, pH, CEC, exchangeable Al, relative yield). One thousand records come from laboratory trials; 2,000 are controlled synthetic samples calibrated against them (fixed seed 42, sigma 0.2375). The package includes: (1) AgroMineral-PCA v1.0.0, MIT-licensed Python software running a four-stage pipeline (multiplicative replacement and CLR with PCA; OLS with five-fold cross-validation and 1,000 bootstrap resamples; Varimax factor analysis building a 0-100 Mineral Quality Index; k-means clustering), with nine unit tests; (2) full pipeline outputs in JSON/CSV, including MQI and commercial category (A-Premium to D-Low) for all 3,000 samples; (3) the seven manuscript figures in PNG and TIFF at 300 dpi; (4) an Excel workbook with the eight article tables and sixteen editable native charts; (5) the anonymous manuscript and complementary files. The model predicts potassium solubility with R2 = 0.725 (RMSE 0.079) and classifies each sample in 1.68 seconds on a conventional CPU.

Files

Steps to reproduce

REPRODUCTION STEPS 1. Requirements: Python 3.10+; numpy, pandas, scikit-learn, scipy (see requirements.txt). 2. Create and activate an environment: python -m venv .venv, then activate it. 3. Install the software: cd 02_Software/AgroMineral-PCA; pip install -r requirements.txt; pip install -e . 4. Run the full pipeline (E1-E10): python examples/run_demo.py data/dataset_remineralizacion_final.csv 5. Run the unit tests: pytest tests/ -v (9 tests; two runs with seed=42 give identical results). 6. Optional: scale benchmark with the function benchmark_escala; figure scripts are in 04_Figuras/scripts_figuras. 7. Verify expected outputs: cross-validated R2 = 0.7251 (SD 0.0134); RMSE = 0.0794; two principal components retain 97.25% of variance; three Varimax factors (84.74%); MQI-yield correlation 0.597; k = 4 clusters (silhouette 0.450); total runtime about 1.68 s for 3,000 samples on CPU.

Institutions

Categories

Agronomy, Bioavailability, Acceptance-Rejection Algorithm

Licence