Automated Soil Profile Classification per WRB 2022, 'SiBCS' 5 and USDA Soil Taxonomy 13
Overview
Implements deterministic classification keys for the World Reference Base for Soil Resources 2022 (4th edition) and the Brazilian System of Soil Classification ('SiBCS', 5th edition). Provides a unified profile representation with explicit per-attribute provenance, multimodal extraction from field reports and photos via vision-language models, spatial priors from 'SoilGrids' and national soil maps, and gap-filling of soil attributes from Vis-NIR or MIR spectra via the Open Soil Spectral Library ('OSSL'). The taxonomic key itself is never delegated to a language model; LLMs are restricted to schema-validated extraction. Each classification result reports a key trace, a provenance-aware evidence grade, and ambiguities that further measurement would resolve.
Tests: the slow ones run off CRAN
The CRAN pre-test of 0.9.258 (2026-10-14) did not pass automatically on
r-devel-windows-x86_64: "Overall checktime 14 min > 10 min", mainly from the
tests, 461 s on Windows (158 s on Debian). The CRAN team asked to reduce the
test timings, among other ways by running less important tests only off CRAN.
Every test that took more than 0.03 s on CRAN's terms (NOT_CRAN unset, the
installed package) on a fast machine now starts with skip_on_cran(): 457
tests in 137 files. They run as before with devtools::test() and wherever
NOT_CRAN=true. The core of the three keys stays on CRAN, slow as it is:
the tests that the canonical profiles classify to their WRB Reference Soil
Group, to their SiBCS order, and to their USDA order.
| | before | now |
Show all changes in 0.9.259Hide the rest of the changes in 0.9.259
|---|---|---|
| tests run on CRAN | 1,821 | 1,354 |
| time of the tests on CRAN's terms, this machine | 87 s | 21 s |
| the same, the whole test process | 98 s | 28 s |
Windows ran the tests of 0.9.258 about five times slower than this machine;
by that ratio they take about 150 s there now.
The links to Embrapa's AgroAPI are text
The check of this version found the three addresses of Embrapa's AgroAPI
(www.agroapi.cnptia.embrapa.br) out of reach: the server did not answer in
60 s, and the incoming check waited for it. The addresses stay, written as
text and no longer as links: in the NEWS entry of 0.9.237, in the README, and
in inst/CITATION, where the entry of the SmartSolos Expert article loses its
url and keeps its DOI. As for the data servers in 0.9.155.
No code changes; the classification of every profile is the same.
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-17
- WARNING12 OK, 1 WARNING2026-10-01
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-19
Show 4 earlier changesHide 4 earlier changes
- WARNING12 OK, 1 WARNING2026-06-17
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK6 OK2026-05-20
Documentation
- Help pages
- 350 (18 internal)includes a package overview page
- Examples that run
- 37%24 run in a plain check · 3 only when donttest examples are enabled (R CMD check --as-cran) · 38 never run
- Exported functions with examples
- 19%
- Documented parameters
- 99%
- Return-value docs
- 98%
- Help pages citing references
- 18%
Also includes 1 demo script (run with demo())
- Benchmarking soilKey against WoSIS HTML
- Começando com soilKey (PT-BR) HTML
- Cross-system classification: WRB 2022, SiBCS 5, USDA Soil Taxonomy HTML
- End-to-end pipeline: Gemma 4 + spatial + spectral + key + GIS export HTML
- End-to-end WRB 2022 classification with full names HTML
- Field-photo-only classification HTML
- Getting started with soilKey HTML
- KSSL + NASIS: multi-level USDA Soil Taxonomy benchmark HTML
- Provenance-weighted classification uncertainty HTML
- Spatial prior + OSSL spectra pipeline (Modules 3 & 4) HTML
Show 3 moreHide 3 vignettes
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
PRs over time
Commits over time
Commit identities over time
15 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/hugomachadorodrigues/soilkey on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-11 · The repository has a site deploy workflow
pkgdown site last built 2026-10-11, before release 0.9.259 (2026-10-14)
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-04-25Named in .Rbuildignore: .claudeNamed in .gitignore: .claudeCommits: some crediting it in the message, count not recorded
Dependencies
Installing soilKey adds 5 packages (4 with compiled code, 7.2 MB of source tarballs). Heaviest: data.table 5.7 MB, rlang 766 KB, cli 629 KB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.9.259Latest2026-10-14 · current release · diff ↗ ·
added 8 exports
cohesic, cryic_horizon, folic, nitisol, read_wosis_layers_graphql, read_wosis_profiles_graphql, wosis_citation, wosis_profile_to_pedon - 0.9.1842026-07-07 · diff ↗ ·
added 4 exports
apply_spectral_preprocessing, classify_csv, key_trace_table, read_pedon_csv - 0.9.1572026-06-30 · diff ↗
- 0.9.1552026-06-22 · diff ↗ ·
removed 592 exports
acric_andisol_usda, acric_oxisol_usda, aeric_oxisol_usda, aeric_subgroup_usda, al_rich_spodic_usda, albaquult_qualifying_usda, albic_horizon_usda, albic_subgroup_usda, alboll_qualifying_usda, alfic_subgroup_usda, alfisol_qualifying_usda, alfisol_usda, alic_andisol_usda, andic_soil_properties_usda, andic_subgroup_usda, andisol_qualifying_usda, andisol_usda, anhydrous_conditions_usda, anionic_subgroup_usda, aqualf_qualifying_usda, aquand_qualifying_usda, aquandic_subgroup_usda, aquent_qualifying_usda, aquept_qualifying_usda, aquert_qualifying_usda, aquic_conditions_usda, aquic_subgroup_usda, aquoll_qualifying_usda, aquult_qualifying_usda, arenic_subgroup_usda and 562 moreadded 18 exports
apply_soilgrids_depth_prior, benchmark_spectral_fill, build_taxon_profiles, classify_from_photos, classify_usda_family, classify_with_uncertainty, compute_per_attribute_evidence_grade, coverage_report, ensure_horizon_schema, gapfill_by_predicted_taxon, gapfill_derive_horizon, gapfill_within_pedon, get_perturbation_scale, horizon_column_spec, pedons_from_spectral_table, read_spectral_library, run_all_benchmarks, validate_horizon_geometry - 0.9.972026-05-19
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-05-19
- Total releases
- 5 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1
- Bundled data
- 1.1 MB / 1 file
- Download size
- 5.9 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("soilKey")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.