
Package index
Core data structures
The unified profile carrier. Every classification, every provenance tag, every key-trace lives on one of these objects.
-
PedonRecord - PedonRecord: structured representation of a single pedon
-
DiagnosticResult - DiagnosticResult: structured outcome of a diagnostic test
-
ClassificationResult - ClassificationResult: structured outcome of running a key
-
FamilyAttribute - Classe S4-like para atributos de Familia (5o nivel SiBCS)
-
horizon_column_spec() - Canonical horizon column specification
-
make_empty_horizons() - Build an empty horizons data.table with the canonical schema
-
ensure_horizon_schema() - Coerce a horizons-like data.frame to the canonical schema
-
validate_horizon_geometry() - Validate horizon depth geometry
Classification entry points
One function per system. Each returns a ClassificationResult with the assigned name, the full key trace, the per-attribute provenance log, and the evidence grade.
-
classify_wrb2022() - Classify a pedon under WRB 2022
-
classify_sibcs() - Classifica um pedon segundo o SiBCS 5a edicao (1o + 2o + 3o + 4o niveis)
-
classify_sibcs_familia() - Classifica um perfil no 5o nivel categorico do SiBCS (Familia)
-
classify_usda() - Classify a pedon under USDA Soil Taxonomy (13th edition)
-
classify_all() - Classify a pedon across all three taxonomic systems
-
classify_from_documents() - Build a fully-classified `PedonRecord` from documents in one call
-
classify_from_photos() - Classify a soil profile from field photographs alone
-
classify_by_spectral_neighbours() - Classify a soil by spectral similarity to OSSL reference profiles
-
soil_classes_at_location() - Likely soil classes at a geographic location (spatial classification aid)
-
apply_soilgrids_depth_prior() - Fill missing horizon attributes from a SoilGrids depth prior
-
gapfill_within_pedon() - Fill interior missing horizon attributes by within-pedon depth interpolation
-
gapfill_derive_horizon() - Fill horizon attributes derivable BY DEFINITION from the same horizon
-
build_taxon_profiles() - Build per-taxon mean depth profiles for predicted-taxon gap-fill
-
gapfill_by_predicted_taxon() - Fill missing horizon attributes from the predicted taxon's mean profile
-
compute_per_attribute_evidence_grade() - Per-attribute provenance-aware evidence grade
Interoperability
Conversion to / from the canonical R soil-data ecosystem: aqp::SoilProfileCollection. Round-trip preserving.
-
as_aqp() - Convert one or more PedonRecord objects to an aqp SoilProfileCollection
-
from_aqp() - Convert an aqp SoilProfileCollection back to a list of PedonRecord
Interactive Shiny app
Drag-and-drop CSV web interface; renders all three classifications side-by-side and exports a self-contained HTML report.
-
run_classify_app() - Launch the soilKey interactive classification Shiny app
USDA Soil Taxonomy 13ed – diagnostic helpers
Soil Taxonomy diagnostic helpers used by the v0.9.27+ argillic / clay-films logic.
-
argillic_clay_films_test() - Test for clay-illuviation evidence (KST 13ed Ch 3 p 4)
-
canonicalise_kst13ed_gg() - Canonicalise a USDA Great Group label to a KST 13ed-compatible key
-
normalise_kssl_subgroup() - Normalise KSSL USDA subgroup labels for benchmark comparison
WRB 2022 – diagnostic horizons (Ch 3.1)
32/32 diagnostic horizons per IUSS Working Group WRB (2022) Ch 3.1.
-
argic() - Argic horizon (WRB 2022)
-
albic() - Albic horizon (WRB 2022)
-
cambic() - Cambic horizon (WRB 2022)
-
calcic() - Calcic horizon (WRB 2022)
-
duric_horizon() - Duric horizon (WRB 2022)
-
ferralic() - Ferralic horizon (WRB 2022)
-
ferric() - Ferric horizon (WRB 2022)
-
fragic() - Fragic horizon (WRB 2022): a high-bulk-density horizon with restricted rooting. v0.3.3: detects via bulk_density_g_cm3 >= 1.65 AND structure grade massive/very firm OR designation pattern
x/Bx. -
gypsic() - Gypsic horizon (WRB 2022)
-
histic_horizon() - Histic horizon (WRB 2022)
-
mollic() - Mollic horizon (WRB 2022)
-
natric_horizon() - Natric horizon (WRB 2022)
-
nitic_horizon() - Nitic horizon (WRB 2022)
-
petrocalcic() - Petrocalcic horizon (WRB 2022)
-
petroduric() - Petroduric horizon (WRB 2022): cemented duric.
-
petrogypsic() - Petrogypsic horizon (WRB 2022): cemented gypsic.
-
petroplinthic() - Petroplinthic horizon (WRB 2022): cemented plinthic.
-
pisoplinthic() - Pisoplinthic horizon (WRB 2022): pisolitic plinthic. v0.3.3 detects via designation pattern
Bspl/Bvpior via plinthite \>= 15% AND structure_type containing 'pisol'. -
plinthic() - Plinthic horizon (WRB 2022)
-
salic() - Salic horizon (WRB 2022)
-
sombric() - Sombric horizon (WRB 2022): subsurface accumulation of humus that qualified neither as spodic nor as a true mollic-like horizon (low-base-saturation cool tropical highlands). v0.3.3 detects via designation pattern + OC criteria (BS < 50, OC > 0.6, depth > 25 cm).
-
spodic() - Spodic horizon (WRB 2022)
-
thionic() - Thionic horizon (WRB 2022): post-oxidation acid sulfate horizon. Requires sulfidic_s_pct >= 0.01 AND pH(H2O) <= 4.
-
umbric_horizon() - Umbric horizon (WRB 2022)
-
vertic_horizon() - Vertic horizon (WRB 2022 Ch 3.1)
-
chernic() - Chernic horizon (WRB 2022): the cherozemic-style mollic with very high biological activity (worm holes, casts, coprolites). v0.3.3: delegates to mollic + worm_holes_pct >= 50 (proxy for "biological homogenization").
-
tsitelic() - Tsitelic horizon (WRB 2022 Ch 3.1)
-
panpaic() - Panpaic horizon (WRB 2022 Ch 3.1)
-
limonic() - Limonic horizon (WRB 2022 Ch 3.1)
-
protovertic() - Protovertic horizon (WRB 2022 Ch 3.1)
-
anthraquic() - Anthraquic horizon (WRB 2022): puddled-rice / paddy plough layer. v0.3.3 detects via designation pattern
Apl|Ap|Hh. -
hydragric() - Hydragric horizon (WRB 2022): subsoil hydric horizon under anthraquic. v0.3.3 detects via designation pattern
Bg|Brgimmediately below an anthraquic-like topsoil. -
hortic() - Hortic horizon (WRB 2022): garden / kitchen-midden topsoil. Diagnostic criteria: thickness \>= 20 cm, dark colour (mollic-like), high P (Mehlich-3 P >= 100 mg/kg or P2O5_1pct_citric >= 175 mg/kg), high SOC.
-
irragric() - Irragric horizon (WRB 2022): topsoil thickened by irrigation deposits. v0.3.3: thickness >= 20 cm + sediment-derived structure proxied via designation
Apk|Apg|Au. -
plaggic() - Plaggic horizon (WRB 2022): sod-derived topsoil >= 20 cm with low BD AND independent evidence of human input.
-
pretic() - Pretic horizon (WRB 2022): "Amazonian Dark Earth" (terra preta de indio) horizon – thick anthropogenic surface with high P, SOC, and incorporated charcoal / pottery.
-
terric() - Terric horizon (WRB 2022): topsoil thickened by long-term application of mineral material (sediment / sand additions). v0.3.3: thickness >= 20 cm + designation Au / Apc.
-
abrupt_textural_difference() - Abrupt textural difference (WRB 2022 Ch 3.2.1)
-
albeluvic_glossae() - Albeluvic glossae (WRB 2022 Ch 3.2.2)
-
andic_properties() - Andic properties (WRB 2022)
-
anthric_horizons() - Anthric horizons (WRB 2022)
-
continuous_rock() - Continuous rock (WRB 2022 Ch 3.2.5)
-
gleyic_properties() - Gleyic properties (WRB 2022)
-
lithic_discontinuity() - Lithic discontinuity (WRB 2022 Ch 3.2.7)
-
protocalcic_properties() - Protocalcic properties (WRB 2022 Ch 3.2.8)
-
protogypsic_properties() - Protogypsic properties (WRB 2022 Ch 3.2.9): visible secondary gypsum \>= 1% but below the gypsic gate.
-
reducing_conditions() - Reducing conditions (WRB 2022 Ch 3.2.10) – per-pedon test wrapping
test_reducing_conditions. -
retic_properties() - Retic properties (WRB 2022)
-
shrink_swell_cracks() - Shrink-swell cracks (WRB 2022 Ch 3.2.12) – per-pedon test wrapping
test_shrink_swell_cracks. -
sideralic_properties() - Sideralic properties (WRB 2022 Ch 3.2.13)
-
stagnic_properties() - Stagnic properties (WRB 2022)
-
takyric_properties() - Takyric properties (WRB 2022 Ch 3.2.15) – per-pedon test wrapping
test_takyric_surface. -
vertic_properties() - Vertic properties (WRB 2022)
-
vitric_properties() - Vitric properties (WRB 2022 Ch 3.2.16)
-
yermic_properties() - Yermic properties (WRB 2022 Ch 3.2.17) – per-pedon test wrapping
test_yermic_surface.
-
aeolic_material() - Aeolic material (WRB 2022 Ch 3.3.1)
-
artefacts() - Artefacts (WRB 2022 Ch 3.3.2)
-
calcaric_material() - Calcaric material (WRB 2022 Ch 3.3.3): \>= 2% CaCO3 throughout the fine earth, primary carbonates from the parent material.
-
claric_material() - Claric material (WRB 2022 Ch 3.3.4): light-coloured fine earth with Munsell criteria.
-
dolomitic_material() - Dolomitic material (WRB 2022 Ch 3.3.5): \>= 2% Mg-rich carbonate, CaCO3/MgCO3 < 1.5. v0.3.3: detects via designation pattern
kdo|do|magnas proxy when ratio data missing. -
fluvic_material() - Fluvic material (WRB 2022)
-
gypsiric_material() - Gypsiric material (WRB 2022 Ch 3.3.7): \>= 5% gypsum that is primary (not secondary). Without a "secondary fraction" schema column, v0.3.3 treats any layer with caso4_pct >= 5 as gypsiric unless it explicitly carries gypsic-horizon designation.
-
hypersulfidic_material() - Hypersulfidic material (WRB 2022 Ch 3.3.8): \>= 0.01% inorganic sulfidic S, pH \>= 4, capable of severe acidification on aerobic incubation.
-
hyposulfidic_material() - Hyposulfidic material (WRB 2022 Ch 3.3.9): same inorganic sulfidic S and field pH as hypersulfidic but does NOT consist of hypersulfidic (criterion 3 – does not acidify to pH < 4 on aerobic incubation, usually self-neutralised by carbonate). Reachable from v0.9.128: when
incubation_phis measured, a sulfidic + pH>=4 layer that stays >= 4 on incubation is the set-complement ofhypersulfidic_materialand is reported here. Without an incubation pH the two cannot be told apart, so this returns empty (the layer is reported as potential hypersulfidic instead). -
limnic_material() - Limnic material (WRB 2022 Ch 3.3.10): subaquatic deposits (coprogenous earth, diatomaceous earth, marl, gyttja). v0.3.3: detects via
rock_origin %in% c("lacustrine", "marine")or designation pattern. -
mineral_material() - Mineral material (WRB 2022 Ch 3.3.11): < 20% SOC AND < 35% volume artefacts containing >= 20% organic carbon. The complement of organic_material / organotechnic_material.
-
mulmic_material() - Mulmic material (WRB 2022 Ch 3.3.12): mineral material developed from organic material; \>= 8% SOC, with low BD, structural / chroma criteria.
-
organic_material() - Organic material (WRB 2022 Ch 3.3.13): \>= 20% SOC + recognisability criteria. v0.3.3: SOC threshold only.
-
organotechnic_material() - Organotechnic material (WRB 2022 Ch 3.3.14): \>= 35% volume of artefacts that themselves contain \>= 20% organic C. Soil itself has < 20% SOC.
-
ornithogenic_material() - Ornithogenic material (WRB 2022 Ch 3.3.15): bird-influenced topsoil. Mehlich-3 P >= 750 mg/kg + designation pattern
Aornit|Bornit. -
soil_organic_carbon() - Soil organic carbon (WRB 2022 Ch 3.3.16): organic C that does NOT belong to artefacts. v0.3.3: any layer with oc_pct >= 0.1 and artefacts_industrial_pct < 35.
-
solimovic_material() - Solimovic material (WRB 2022 Ch 3.3.17): hetero genous mass-movement material on slopes / footslopes (formerly "colluvic"). v0.3.3: detects via
rock_origin == "colluvial"ORlayer_origin == "solimovic". -
technic_features() - Technic features (WRB 2022)
-
tephric_material() - Tephric material (WRB 2022 Ch 3.3.19): \>= 30% volcanic glass in 0.02-2 mm fraction AND no andic / vitric properties.
-
acrisol() - Acrisol RSG diagnostic (WRB 2022)
-
alisol() - Alisol RSG diagnostic (WRB 2022)
-
lixisol() - Lixisol RSG diagnostic (WRB 2022)
-
luvisol() - Luvisol RSG diagnostic (WRB 2022)
-
chernozem() - Chernozem RSG diagnostic (WRB 2022)
-
kastanozem() - Kastanozem RSG diagnostic (WRB 2022)
-
phaeozem() - Phaeozem RSG diagnostic (WRB 2022)
-
andosol() - Andosol RSG gate (WRB 2022 Ch 4, p 104)
-
chernozem_strict() - Chernozem RSG gate (strengthened, WRB 2022 Ch 4, p 111)
-
kastanozem_strict() - Kastanozem RSG gate (strengthened, WRB 2022 Ch 4, p 112)
SiBCS 5ª ed. – horizontes B diagnósticos (Cap 2)
Os gates de horizonte B públicos. As demais gates da chave SiBCS (carater_, horizonte_, atributos, qualifiers WRB, e os dispatchers por Ordem) são o motor determinístico interno, despachado por classify_sibcs() / classify_wrb2022(); veja a seção “Internal – motor taxonômico” no fim da referência.
-
B_textural() - Horizonte B textural (SiBCS Cap 2, p 54-57; v0.7 strict)
-
B_latossolico() - Horizonte B latossolico (SiBCS Cap 2, p 57-59; v0.7 strict)
-
B_nitico() - Horizonte B nitico (SiBCS Cap 2, p 61-62; v0.7)
-
B_espodico() - Horizonte B espodico (SiBCS Cap 2, p 62-65; v0.7)
-
B_incipiente() - Horizonte B incipiente (SiBCS Cap 2, p 59-61; v0.7)
-
B_planico() - Horizonte B planico (SiBCS Cap 2, p 65-66; v0.7)
SiBCS 5ª ed. – Família (5º nível, Cap 18)
O 5º nível categórico (família), via classify_sibcs(include_familia = TRUE).
-
classify_sibcs_familia() - Classifica um perfil no 5o nivel categorico do SiBCS (Familia)
USDA Soil Taxonomy 13ed – Família (5º nível)
Os modificadores de família (particle-size, mineralogy, CEC-activity, reaction, temperature, depth) via classify_usda(pedon, include_family = TRUE). Os gates de Ordem -> Subgrupo são internos (veja “Internal”).
-
classify_usda_family() - Classify the USDA family (5th level) of a pedon
Module 2 – VLM extraction
Schema-validated multimodal extraction via ellmer. The VLM never classifies; every extracted value carries provenance = extracted_vlm.
-
vlm_provider() - Construct a VLM provider chat object
-
MockVLMProvider - Mock VLM provider for testing
-
extract_horizons_from_pdf() - Extract horizons from a soil description PDF
-
extract_munsell_from_photo() - Extract Munsell color from a profile photo
-
extract_site_from_fieldsheet() - Extract site metadata from a field-sheet image
Module 3 – Spatial prior
SoilGrids + Embrapa raster. Used as a sanity-check; never overrides the deterministic key.
-
spatial_prior() - Spatial prior over RSGs (or Orders) at a pedon's location
-
spatial_prior_soilgrids() - SoilGrids spatial prior
-
spatial_prior_embrapa() - Embrapa national soil-class spatial prior (Brazil only)
-
prior_consistency_check() - Check consistency between a deterministic RSG assignment and a spatial prior
Module 4 – OSSL spectroscopy
Vis-NIR / MIR gap-fill. Predicted attributes carry provenance = predicted_spectra, which downgrades the evidence grade from A to B.
-
preprocess_spectra() - Pre-process Vis-NIR or MIR spectra
-
predict_ossl_mbl() - Memory-based learning prediction against the OSSL library
-
predict_ossl_plsr_local() - Local PLSR prediction against the OSSL library
-
predict_ossl_pretrained() - Pre-trained OSSL prediction
-
fill_from_spectra() - Fill missing soil attributes from spectra via OSSL
-
read_spectral_library() - Read a Vis-NIR / MIR reflectance + lab table into an OSSL-shaped library
-
pedons_from_spectral_table() - Build PedonRecords with attached Vis-NIR/MIR spectra from a table
-
benchmark_spectral_fill() - Benchmark the accuracy lift of spectral gap-fill (ON vs OFF), k-fold
-
pi_to_confidence() - Map a 95% prediction interval to a [0, 1] confidence score
-
report() - Render a soilKey classification report
-
report_html() - Render a soilKey classification report as self-contained HTML
-
report_pdf() - Render a soilKey classification report as PDF
-
report_to_qgis() - Export a classification result + pedon to a QGIS GeoPackage
Layperson on-ramp
Zero-code Shiny GUI plus auto-detect helpers that remove the friction non-coders hit on a fresh install.
-
run_demo() - Launch the soilKey Shiny demo (one-screen GUI)
-
auto_set_proj_env() - Auto-detect PROJ_LIB and GDAL_DATA directories
-
vlm_pick_provider() - Pick the best available VLM provider
-
ollama_is_running() - Is the local Ollama HTTP API reachable?
Real-data benchmarks (v0.9.15+)
Loaders for the three external validation sets soilKey is benchmarked against in the v1.0 methods paper, plus FEBR / BDsolos label-normalisation helpers (v0.9.16).
-
load_kssl_pedons() - Load NCSS / KSSL pedons with reference USDA Soil Taxonomy classification
-
load_kssl_pedons_gpkg() - Load KSSL / NCSS pedons from the ncss_labdata GeoPackage
-
load_kssl_pedons_with_nasis() - Load KSSL pedons enriched with NASIS morphology
-
load_lucas_pedons() - Load EU-LUCAS / ESDB pedons with reference WRB classification
-
load_embrapa_pedons() - Load Embrapa dadosolos pedons with reference SiBCS classification
-
load_febr_pedons() - Load the Embrapa FEBR superconjunto into a list of PedonRecords
-
normalise_febr_sibcs() - Canonicalise FEBR SiBCS names to match soilKey rule outputs.
-
normalise_febr_wrb() - Normalise FEBR WRB taxon strings to RSG-only
-
normalise_febr_usda() - Normalise FEBR USDA taxon strings to USDA Soil Taxonomy Order
-
benchmark_run_classification() - Run a benchmark across one of the loaded pedon lists
Canonical fixtures
One-call constructors for the 31 canonical fixtures (one per WRB RSG, plus auxiliaries) used in the test suite.
-
make_acrisol_canonical() - Build the canonical Acrisol fixture
-
make_alisol_canonical() - Build the canonical Alisol fixture
-
make_andosol_canonical() - Build the canonical Andosol fixture
-
make_anthrosol_canonical() - Build the canonical Anthrosol fixture
-
make_arenosol_canonical() - Build the canonical Arenosol fixture
-
make_argissolo_canonical() - Perfil canonico de Argissolo (SiBCS 5a ed., Cap 5)
-
make_calcisol_canonical() - Build the canonical Calcisol fixture
-
make_cambisol_canonical() - Build the canonical Cambisol fixture
-
make_cambissolo_canonical() - Perfil canonico de Cambissolo (SiBCS 5a ed., Cap 6)
-
make_chernossolo_canonical() - Perfil canonico de Chernossolo (SiBCS 5a ed., Cap 7)
-
make_chernozem_canonical() - Build the canonical Chernozem fixture
-
make_cryosol_canonical() - Build the canonical Cryosol fixture
-
make_durisol_canonical() - Build the canonical Durisol fixture
-
make_espodossolo_canonical() - Perfil canonico de Espodossolo (SiBCS 5a ed., Cap 8)
-
make_ferralsol_canonical() - Build the canonical Ferralsol fixture
-
make_fluvisol_canonical() - Build the canonical Fluvisol fixture
-
make_gleissolo_canonical() - Perfil canonico de Gleissolo (SiBCS 5a ed., Cap 9)
-
make_gleysol_canonical() - Build the canonical Gleysol fixture
-
make_gypsisol_canonical() - Build the canonical Gypsisol fixture
-
make_histosol_canonical() - Build the canonical Histosol fixture
-
make_kastanozem_canonical() - Build the canonical Kastanozem fixture
-
make_latossolo_canonical() - Perfil canonico de Latossolo (SiBCS 5a ed., Cap 10)
-
make_leptosol_canonical() - Build the canonical Leptosol fixture
-
make_lixisol_canonical() - Build the canonical Lixisol fixture
-
make_luvisol_canonical() - Build the canonical Luvisol fixture
-
make_luvissolo_canonical() - Perfil canonico de Luvissolo (SiBCS 5a ed., Cap 11)
-
make_neossolo_canonical() - Perfil canonico de Neossolo Litolico (SiBCS 5a ed., Cap 12)
-
make_nitisol_canonical() - Build the canonical Nitisol fixture
-
make_nitossolo_canonical() - Perfil canonico de Nitossolo Vermelho (SiBCS 5a ed., Cap 13)
-
make_organossolo_canonical() - Perfil canonico de Organossolo (SiBCS 5a ed., Cap 14)
-
make_phaeozem_canonical() - Build the canonical Phaeozem fixture
-
make_planosol_canonical() - Build the canonical Planosol fixture
-
make_planossolo_canonical() - Perfil canonico de Planossolo (SiBCS 5a ed., Cap 15)
-
make_plinthosol_canonical() - Build the canonical Plinthosol fixture
-
make_plintossolo_canonical() - Perfil canonico de Plintossolo (SiBCS 5a ed., Cap 16)
-
make_podzol_canonical() - Build the canonical Podzol fixture
-
make_retisol_canonical() - Build the canonical Retisol fixture
-
make_solonchak_canonical() - Build the canonical Solonchak fixture
-
make_solonetz_canonical() - Build the canonical Solonetz fixture
-
make_stagnosol_canonical() - Build the canonical Stagnosol fixture
-
make_technosol_canonical() - Build the canonical Technosol fixture
-
make_umbrisol_canonical() - Build the canonical Umbrisol fixture
-
make_vertisol_canonical() - Build the canonical Vertisol fixture
-
make_vertissolo_canonical() - Perfil canonico de Vertissolo (SiBCS 5a ed., Cap 17)
-
run_all_benchmarks() - Run the full soilKey benchmark suite and (optionally) write a report
-
run_classify_app() - Launch the soilKey interactive classification Shiny app
-
run_demo() - Launch the soilKey Shiny demo (one-screen GUI)
-
run_sibcs_grande_grupo() - Resolve o grande grupo (3o nivel) de um pedon classificado em uma subordem SiBCS
-
run_sibcs_key() - Roda a chave SiBCS 5a edicao sobre um pedon
-
run_sibcs_subgrupo() - Resolve o subgrupo (4o nivel) de um pedon classificado em um Grande Grupo SiBCS
-
run_sibcs_subordem() - Resolve a subordem de um pedon ja classificado em uma ordem SiBCS
-
run_taxa_list() - Iterate a flat taxa list and evaluate tests in canonical order
-
run_taxonomic_key() - Run a taxonomic key (system-agnostic engine)
-
run_usda_great_group() - Run the USDA Great Group key for a given Suborder
-
run_usda_key() - Run the USDA Soil Taxonomy Order key over a pedon
-
run_usda_subgroup() - Run the USDA Subgroup key for a given Great Group
-
run_usda_suborder() - Run the USDA Suborder key for a given Order
-
run_wrb_key() - Run the WRB 2022 key over a pedon
-
compute_ki() - Ki (silica:alumina molar) – SiBCS Cap 1, p 32
-
compute_kr() - Kr (silica:sesquioxidos molar) – SiBCS Cap 1, p 32
-
compute_per_attribute_evidence_grade() - Per-attribute provenance-aware evidence grade
-
load_afsp_pedons() - Load Africa Soil Profiles (AfSP) v1.2 as PedonRecord objects
-
load_afsp_sample() - Load the bundled AfSP stratified sample (v0.9.77)
-
load_bdsolos_csv() - Load a BDsolos CSV export as a list of PedonRecord objects
-
load_embrapa_pedons() - Load Embrapa dadosolos pedons with reference SiBCS classification
-
load_febr_pedons() - Load the Embrapa FEBR superconjunto into a list of PedonRecords
-
load_kssl_nasis_sample() - Load the bundled KSSL + NASIS morphological-enriched sample (v0.9.75)
-
load_kssl_pedons() - Load NCSS / KSSL pedons with reference USDA Soil Taxonomy classification
-
load_kssl_pedons_gpkg() - Load KSSL / NCSS pedons from the ncss_labdata GeoPackage
-
load_kssl_pedons_with_nasis() - Load KSSL pedons enriched with NASIS morphology
-
load_kssl_sample() - Load the bundled KSSL/NCSS lab-data sample (v0.9.74)
-
load_lucas_pedons() - Load EU-LUCAS / ESDB pedons with reference WRB classification
-
load_lucas_soil_2018() - Load the LUCAS Soil 2018 Topsoil release as a list of PedonRecord objects
-
load_redape_pedons() - Load curated soil profiles from the Embrapa Redape GeoTab dataset
-
load_rules() - Load a soilKey rule set (YAML)
-
load_wosis_sample() - Load the bundled WoSIS South-America sample
-
load_wosis_stratified_sample() - Load the bundled WoSIS stratified RSG-balanced sample (v0.9.73)
-
save_ossl_models()load_ossl_models() - Save / load trained OSSL-backed PLSR models
-
apply_soilgrids_depth_prior() - Fill missing horizon attributes from a SoilGrids depth prior
-
format_wrb_name() - Format a WRB 2022 soil name with qualifiers
-
validate_horizon_geometry() - Validate horizon depth geometry
-
validate_pedon_json() - Validate a PedonRecord against the JSON schema
-
leptic_features() - Leptic features (WRB 2022)
-
planic_features() - Planic features (WRB 2022)
-
technic_features() - Technic features (WRB 2022)
-
andic_properties() - Andic properties (WRB 2022)
-
gleyic_properties() - Gleyic properties (WRB 2022)
-
protocalcic_properties() - Protocalcic properties (WRB 2022 Ch 3.2.8)
-
protogypsic_properties() - Protogypsic properties (WRB 2022 Ch 3.2.9): visible secondary gypsum \>= 1% but below the gypsic gate.
-
retic_properties() - Retic properties (WRB 2022)
-
sideralic_properties() - Sideralic properties (WRB 2022 Ch 3.2.13)
-
stagnic_properties() - Stagnic properties (WRB 2022)
-
takyric_properties() - Takyric properties (WRB 2022 Ch 3.2.15) – per-pedon test wrapping
test_takyric_surface. -
vertic_properties() - Vertic properties (WRB 2022)
-
vitric_properties() - Vitric properties (WRB 2022 Ch 3.2.16)
-
yermic_properties() - Yermic properties (WRB 2022 Ch 3.2.17) – per-pedon test wrapping
test_yermic_surface. -
`%||%` - Default-value-for-NULL operator
-
arenic_texture() - Arenic texture (WRB 2022)
-
cerosidade() - Cerosidade quantitativa (SiBCS Cap 13, p 207; Cap 1)
-
combine_priors() - Combine multiple spatial priors via weighted geometric mean
-
cryic_conditions() - Cryic conditions (WRB 2022)
-
distrofico() - Solo distrofico (SiBCS Cap 1, p 30)
-
duripa() - Duripa (SiBCS Cap 2, p 74; v0.7)
-
eutrofico() - Solo eutrofico (SiBCS Cap 1, p 30)
-
evaluate_rsg_tests() - Evaluate the test block of a single RSG
-
fibrico() - Material organico fibrico (SiBCS Cap 14)
-
fragipa() - Fragipa (SiBCS Cap 2, p 73-74; v0.7)
-
hemico() - Material organico hemico (SiBCS Cap 14)
-
oxic_usda() - Oxic horizon (USDA Soil Taxonomy)
-
vertic_horizon() - Vertic horizon (WRB 2022 Ch 3.1)
-
protovertic() - Protovertic horizon (WRB 2022 Ch 3.1)
-
panpaic() - Panpaic horizon (WRB 2022 Ch 3.1)
-
tsitelic() - Tsitelic horizon (WRB 2022 Ch 3.1)
-
limonic() - Limonic horizon (WRB 2022 Ch 3.1)
-
make_synthetic_pedon_with_spectra() - Build a synthetic PedonRecord with attached spectra (testing aid)
-
mudanca_textural_abrupta() - Mudanca textural abrupta (SiBCS Cap 1, p 30-31)
-
ossl_library_template() - Canonical schema for an `ossl_library` object
-
clear_ossl_cache() - Clear the soilKey OSSL cache
-
download_ossl_subset() - Download an OSSL subset and return an `ossl_library` artefact
-
download_ossl_subset_with_labels() - Download an OSSL subset and attach WRB / SiBCS / USDA labels
-
familia_mineralogia_argila_geral() - Familia: mineralogia da fracao argila (geral, nao-Latossolos)
-
ossl_demo_sa - Synthetic OSSL South America demo subset
-
planosol() - Planosol RSG gate (WRB 2022 Ch 4, p 107)
-
posterior_classify() - Bayesian posterior classifier (optional)
-
resolve_wrb_qualifiers() - Resolve WRB 2022 qualifiers for a Reference Soil Group
-
saprico() - Material organico saprico (SiBCS Cap 14)
-
soilgrids_usda_lut() - SoilGrids -> USDA Soil Order lookup table (placeholder)
-
soilgrids_wrb_lut() - SoilGrids -> WRB code lookup table
-
subgrupo_planossolo_espessos() - Subgrupo "espessos" de Planossolos (B planico profundo, > 100 cm)
-
subgrupo_planossolo_mesicos() - Subgrupo "mesicos" de Planossolos (B planico topo em [50, 100] cm)
-
subgrupo_plintossolo_endico_concrecionario() - Subgrupo "endico" de Plintossolos Concrecionarios (topo de horizonte concrecionario >= 40 cm)
-
subgrupo_plintossolo_endico_litoplintico() - Subgrupo "endico" de Plintossolos Litoplinticos (topo de horizonte litoplintico >= 40 cm)
-
subgrupo_plintossolo_espessos() - Subgrupo "espessos" de Plintossolos (horizonte plintico topo > 100 cm)
-
ferralsol() - Ferralsol RSG gate (WRB 2022 Ch 4, p 110)
-
gleysol() - Gleysol RSG gate (WRB 2022 Ch 4, p 103)
-
vertisol() - Vertisol RSG gate (WRB 2022 Ch 4, p 101)
-
acrisol() - Acrisol RSG diagnostic (WRB 2022)
-
alisol() - Alisol RSG diagnostic (WRB 2022)
-
lixisol() - Lixisol RSG diagnostic (WRB 2022)
-
luvisol() - Luvisol RSG diagnostic (WRB 2022)
-
chernozem() - Chernozem RSG diagnostic (WRB 2022)
-
chernozem_strict() - Chernozem RSG gate (strengthened, WRB 2022 Ch 4, p 111)
-
kastanozem() - Kastanozem RSG diagnostic (WRB 2022)
-
kastanozem_strict() - Kastanozem RSG gate (strengthened, WRB 2022 Ch 4, p 112)
-
phaeozem() - Phaeozem RSG diagnostic (WRB 2022)
-
andosol() - Andosol RSG gate (WRB 2022 Ch 4, p 104)
-
calcaric_material() - Calcaric material (WRB 2022 Ch 3.3.3): \>= 2% CaCO3 throughout the fine earth, primary carbonates from the parent material.
-
dolomitic_material() - Dolomitic material (WRB 2022 Ch 3.3.5): \>= 2% Mg-rich carbonate, CaCO3/MgCO3 < 1.5. v0.3.3: detects via designation pattern
kdo|do|magnas proxy when ratio data missing. -
hypersulfidic_material() - Hypersulfidic material (WRB 2022 Ch 3.3.8): \>= 0.01% inorganic sulfidic S, pH \>= 4, capable of severe acidification on aerobic incubation.
-
hyposulfidic_material() - Hyposulfidic material (WRB 2022 Ch 3.3.9): same inorganic sulfidic S and field pH as hypersulfidic but does NOT consist of hypersulfidic (criterion 3 – does not acidify to pH < 4 on aerobic incubation, usually self-neutralised by carbonate). Reachable from v0.9.128: when
incubation_phis measured, a sulfidic + pH>=4 layer that stays >= 4 on incubation is the set-complement ofhypersulfidic_materialand is reported here. Without an incubation pH the two cannot be told apart, so this returns empty (the layer is reported as potential hypersulfidic instead). -
solimovic_material() - Solimovic material (WRB 2022 Ch 3.3.17): hetero genous mass-movement material on slopes / footslopes (formerly "colluvic"). v0.3.3: detects via
rock_origin == "colluvial"ORlayer_origin == "solimovic". -
technic_hard_material() - Technic hard material (WRB 2022 Ch 3.3.18): consolidated human-made material (asphalt, concrete, worked stones).
-
tephric_material() - Tephric material (WRB 2022 Ch 3.3.19): \>= 30% volcanic glass in 0.02-2 mm fraction AND no andic / vitric properties.
Engine selection and dispatch (v0.9.65)
Per-pedon engine-selection heuristic, engine-aware dispatch (soilKey vs aqp), and side-by-side comparators.
-
pick_engine() - Choose the best diagnostic engine for a single pedon
-
pick_engine_batch() - Per-pedon batch engine recommendation
-
classify_with_engine_heuristic() - Classify a pedon with the engine chosen by `pick_engine()`
-
compare_engines() - Side-by-side comparison of soilKey vs aqp diagnostic engines
-
argic_aqp() - Argic / argillic horizon via aqp::getArgillicBounds()
-
cambic_aqp() - Cambic horizon via aqp::getCambicBounds()
Canonical references (v0.9.62 – v0.9.65)
Vendored WRB 2022 / KST 13 / Soil Taxonomy criteria and shared lookup helpers for pkg vs vendored data sources.
-
canonical_reference() - Load a canonical reference dataset from soilKey or SoilTaxonomy
-
wrb2022_canonical() - WRB 2022 canonical reference (parsed IUSS Working Group WRB 2022)
-
kst13_canonical() - Keys to Soil Taxonomy 13th edition canonical reference
-
kst13_codes() - Load the canonical KST 13ed code -> taxon-name lookup table
-
kst13_criteria() - Load the canonical KST 13ed criteria for a single taxon code
-
st_features_canonical() - USDA Soil Taxonomy diagnostic features canonical table
-
clear_kst13_cache() - Clear the in-memory KST13 cache
-
coverage_report() - Honest taxonomic-completeness report
SmartSolos / Embrapa AgroAPI integration (v0.9.54)
Cross-validation against Embrapa’s PROLOG SiBCS classifier.
-
classify_via_smartsolos_api() - Classify a PedonRecord via Embrapa's SmartSolosExpert REST API
-
compare_smartsolos() - Cross-validate the local SiBCS classifier against the SmartSolosExpert API
-
benchmark_bdsolos() - Benchmark soilKey classifiers against BDsolos national reference labels
-
download_bdsolos() - Download the BDsolos consulta-publica CSV (experimental, requires chromote)
-
inspect_bdsolos_csv() - Diagnostic inspection of a BDsolos CSV before loading
Argic strong-films audit (v0.9.83)
Empirical audit of the SiBCS Cap 18 latossolic-vs-argic precedence rule. Extracts the strong-clay-films decision into a reusable helper so the rule can be validated on any benchmark dataset (BDsolos RJ: 0.9% Latossolo false-positive exclusion rate, 37.6% Argissolo correct retention rate).
-
argic_with_strong_clay_films() - Test whether a pedon's argic horizon has strong clay films
-
audit_argic_strong_films() - Audit the strong-clay-films exclusion across a list of pedons
Lazy-fetch benchmark caches (v0.9.94)
The four large benchmark caches (AfSP, KSSL, KSSL+NASIS, WoSIS stratified, ~1 MB each) are no longer bundled in the CRAN source tarball. They are downloaded on demand from a versioned GitHub Release into the user cache (~/Library/Application Support/…/soilKey/data on macOS) on first call.
-
download_extdata_cache() - Download one or more soilKey lazy-fetch caches from GitHub Release
-
read_febr_pedons() - Load FEBR datasets as a list of PedonRecord objects
-
febr_index_munsell() - Curated index of FEBR datasets that carry Munsell colors
Redape curated GeoTab dataset (v0.9.71)
Embrapa Redape repository (DOI 10.48432/PYKKA7) – 96 hand- reviewed Brazilian soil profiles, suitable as a gold-standard benchmark for SiBCS classification.
-
download_redape_dataset() - Download the curated Redape GeoTab dataset (Vaz et al 2023)
-
load_redape_pedons() - Load curated soil profiles from the Embrapa Redape GeoTab dataset
-
benchmark_redape() - Benchmark soilKey SiBCS predictions against the Redape gold standard
WoSIS stratified WRB benchmark (v0.9.73)
ISRIC WoSIS bundled cache, 130 profiles balanced across 26 WRB Reference Soil Groups (5 per RSG). The first WRB benchmark with profile depth (analog of Redape but for WRB), pulled via RSG-filtered GraphQL queries.
-
load_wosis_stratified_sample() - Load the bundled WoSIS stratified RSG-balanced sample (v0.9.73)
USDA Soil Taxonomy <-> WRB cross-walk (v0.9.74)
KSSL/NCSS Lab Data Mart benchmark via IUSS WRB 2022 Annex 6 USDA Order/Suborder -> WRB RSG correlation. Provides the richest WRB benchmark to date (CEC 65%, Ca/Mg/K/Na 40-56% vs WoSIS-stratified ~30%).
-
usda_to_wrb_rsg() - USDA Soil Taxonomy <-> WRB Reference Soil Group correlation table
-
annotate_wrb_from_usda() - Annotate KSSL/NASIS pedons with a derived WRB Reference Soil Group
-
benchmark_wrb_vs_usda() - Benchmark soilKey WRB predictions against a USDA-derived ground truth
-
load_kssl_sample() - Load the bundled KSSL/NCSS lab-data sample (v0.9.74)
KSSL + NASIS morphological-enriched sample (v0.9.75)
Joins KSSL lab gpkg with NASIS Morphological sqlite – adds Munsell colours, structure, clay films, slickensides (Munsell 0% -> 89.6% vs lab-only).
-
load_kssl_nasis_sample() - Load the bundled KSSL + NASIS morphological-enriched sample (v0.9.75)
Africa Soil Profiles (AfSP) WRB benchmark (v0.9.77)
ISRIC AfSP v1.2 (Leenaars et al. 2014) – 18,533 georeferenced African profiles, ~7000 with WRB 2006 RSG. Loader + bundled 120-pedon stratified sample (5 per RSG x 24 RSGs). Achieves 28% Order accuracy with strong Cambisol/Histosol (100%) and Ferralsol/Solonetz (80%) recall.
-
load_afsp_pedons() - Load Africa Soil Profiles (AfSP) v1.2 as PedonRecord objects
-
load_afsp_sample() - Load the bundled AfSP stratified sample (v0.9.77)
-
benchmark_afsp() - Benchmark soilKey WRB predictions against AfSP ground truth
-
wrb06_code_to_rsg() - WRB 2006 RSG code -> 2022 RSG name
-
benchmark_lucas_2018() - Run the LUCAS Soil 2018 / ESDB WRB benchmark
-
attach_lucas_spectra() - Attach LUCAS 2018 Vis-NIR spectra to a list of PedonRecord objects
-
benchmark_unified() - Unified cross-dataset benchmark across SiBCS / WRB / USDA
-
run_all_benchmarks() - Run the full soilKey benchmark suite and (optionally) write a report
-
benchmark_performance() - Run the soilKey performance benchmark
-
batch_robustness() - Batch robustness across many pedons
-
classification_robustness() - Robustness of classification under input perturbation
-
classify_with_uncertainty() - Posterior distribution over classification outcomes
-
get_perturbation_scale() - Monte-Carlo perturbation scale for an evidence grade
OSSL spectra: PLS training and prediction
Build PLS regressors from OSSL Vis-NIR/SWIR spectra and predict lab properties / Munsell / XYZ / generic targets.
-
train_pls_from_ossl() - Train pre-trained PLSR models from an OSSL library
-
predict_from_spectra() - Predict soil properties from spectra
-
predict_lab_from_spectra() - Predict CIE Lab from Vis-NIR reflectance spectra
-
predict_munsell_from_spectra() - Predict Munsell hue / value / chroma from Vis-NIR reflectance spectra
-
predict_xyz_from_spectra() - Predict CIE XYZ tristimulus values from Vis-NIR reflectance spectra
-
predict(<soilKey_pls_model>) - Predict from a soilKey_pls_model
-
print(<soilKey_pls_model>) - Print method for soilKey_pls_model
-
fill_munsell_from_spectra() - Fill missing Munsell colors on a PedonRecord from Vis-NIR spectra
-
available_esdb_attributes() - List ESDB Raster Library attributes available at a given root
-
lookup_esdb() - Look up an ESDB raster value at WGS84 coordinates
-
lookup_soilgrids() - Look up a SoilGrids 250m soil property at WGS84 coordinates
-
lookup_mapbiomas_solos() - Look up a MapBiomas Solos raster value at WGS84 coordinates
-
GSM_DEPTHS - Default GlobalSoilMap depth intervals (cm)
-
harmonize_to_gsm() - Harmonise pedons to GlobalSoilMap depth intervals
-
pedon_to_spc() - Convert a soilKey PedonRecord to an aqp SoilProfileCollection
-
pedon_json_schema() - JSON Schema for a soilKey PedonRecord
-
texture_class_from_pct() - NRCS texture-class shorthand from clay / silt / sand percent
Internal – motor taxonômico
Os preditores atômicos do motor determinístico – qualifiers WRB (qual_*), gates de Subgrupo/Grande-Grupo USDA (*_usda), atributos e horizontes diagnósticos SiBCS (carater_*, horizonte_*), e os dispatchers por Ordem. Continuam exportados e chamáveis, mas são despachados por nome pela chave (classify_*); não fazem parte da API pública curada.
-
MockVLMProvider - Mock VLM provider for testing
-
.BDSOLOS_COLUMN_PATTERNS - Canonical mapping from BDsolos column-name variants to soilKey schema
-
.BDSOLOS_SITE_PATTERNS - Site-level columns (BDsolos full export). Mapped at the site, not horizon, level.
-
.FEBR_TO_HORIZON_MAP - Map FEBR layer-table columns to soilKey horizon attributes
-
.GLEYIC_HUE_REGEX - Gleyic Munsell hue patterns (WRB 2022, Ch 3.1.13 redoximorphic features)
-
.KST13_CACHE - Package-level cache for the parsed KST 13ed JSON files
-
.REDAPE_API_BASE - Embrapa Redape Dataverse API endpoint
-
.REDAPE_GEOTAB_DOI - Default DOI for the Vaz et al. 2023 curated GeoTab dataset
-
.SIBCS_LEGACY_ORDER_MAP - Pre-2018 SiBCS Order names -> SiBCS 5a edicao plural Title Case map
-
.SMARTSOLOS_DRAINAGE_SCALE - SmartSolos drainage class scale (DRENAGEM, 1-8)
-
.SOILGRIDS_TO_HORIZON_MAP - Mapping of SoilGrids 250m property names to soilKey horizon columns
-
.SOILKEY_LAZY_FETCH_CACHES - Caches managed by the v0.9.94 lazy-fetch system
-
.SOILKEY_LAZY_FETCH_RELEASE - Versioned GitHub Release tag where the lazy-fetch caches are pinned
-
.WRB_LV1_NAME_BY_CODE - WRB Reference Soil Group code-to-name table
-
soilKeysoilKey-package - soilKey: Automated Soil Profile Classification per WRB 2022 and SiBCS