Turns the profile files saved by fetch_natsoil (or any JSON
of the NatSoil API with horizons, samples and laboratory results) into
PedonRecord objects for classify_asc3 and the
other keys. Sites whose licence does not allow external use are left out.
Usage
load_natsoil_pedons(
path,
classified_only = TRUE,
max_n = NULL,
seed = NULL,
verbose = TRUE
)Arguments
- path
A folder (searched recursively for
.jsonand.json.gzfiles) or a vector of files.- classified_only
Keep only sites with an ASC order.
- max_n
Optional maximum number of files read (a random sample; a profile file of
fetch_natsoilholds one site).- seed
Optional seed for that sample.
- verbose
Print a summary.
Value
A named list of PedonRecord objects (names are
agency_project_site).
Details
The horizons keep their designation in the Australian notation (lithologic prefix, master, subdivision and suffixes), depths in cm, the field texture grade, boundary distinctness and shape, the grade and type of the first structure (lenticular when any structure is), the moist and the dry matrix colours (a colour with no moisture status is read as moist), slickensides, crack width, coarse fragments (abundance classes at their middle, added up to at most 100 %; unknown when a record has no abundance), calcareous segregations (a record with only its nature is a template and is not read; one with a form or size but no abundance counts as very few, 1 %), cementation of pans, effervescence, plasticity type and the moisture when described.
Laboratory results are matched to the horizons by depth: a sample counts
for the horizon it is filed under where they overlap, and for another one
when it lies mostly within it, weighed by the overlap (a sample with no
usable depth counts for the horizon it is filed under). Codes are matched
whatever their case, the "not recorded" methods included. A value below
the detection limit, written "<x", is read as half the limit, unless the
limit lies above a limit the keys read for that property (0.5 % CaCO3,
0.18 cmol/kg Na, an ESP of 6, 5 % free Fe, 12 % organic C, 10 % clay),
where the value is unknown and the next method is tried. pH in water is
the lab 1:5 value (method 4A1, or a pH whose method is not recorded, often
the field pH itself); the field pH is used only where the lab has no pH
at all. Organic C is the measured value, or an uncorrected Walkley-Black
value times 1.3; half the loss on ignition only in peat (an O or P
horizon, or a peat field texture). Exchangeable bases and CEC are read
whatever the extraction method; a laboratory ESP is kept as
esp_pct. Free iron is read only from dithionite extractions; most
profiles have none, which leaves the Ferrosols undecided.
The site keeps the surveyors' classification
(reference_asc_order, reference_asc_suborder,
reference_asc_great_group, reference_asc_subgroup, the
confidence reference_asc_confidence), the drainage class, the
landform pattern and element (landform, landform_element),
the surface condition, the microrelief, coordinates (GDA94), the licence
and the citation. Mottles (not biological or mechanical mixing, nor
substrate inclusions) give redoximorphic_features_pct (abundance
classes at their middle, added up) and mottle_contrast (the
strongest, faint when distinct and prominent ones are 10 % or less on
their own and faint ones make up the rest); calcareous segregations and
calcrete fragments give carbonate_soft_pct (soft segregations, root
linings, tubules, veins and crystals) and carbonate_hard_pct
(nodules, concretions, fragments and laminae, and calcrete coarse
fragments), kept only where what is recorded leaves the amount within one
carbonate class of the ASC glossary (a segregation of unknown form may be
soft or hard, a fragment of unknown lithology calcrete; coarse fragments
not recorded count as none; segregations not recorded leave the soft
amount unknown, and the hard one unless calcrete alone exceeds 50 %).
Ferruginous and bauxite nodules give ferric_nodules_pct and
bauxitic_nodules_pct; since 0.9.285 manganiferous nodules give
manganiferous_nodules_pct, and gypseous and saline segregations
gypsum_visible_pct and halite_visible_pct. Only what is
recorded counts (a segregation of unrecorded nature or form is not one of
them); the amount is NA when no segregation is recorded, and NaN when the
recorded classes leave it on either side of 20 % (50 % for halite),
which the key reads as undecided. Abundance classes of several
records are added as ranges (each class strictly between its limits).
Laboratory EC of a 1:5 extract gives ec_1to5_dS_m; the soil
strength gives strength_dry or strength_moist by the moisture
of its record; the size class of the first structure gives
ped_size_max_mm. Since 0.9.292, for the families: gravel_pct
(the coarse fragments of a gravel size class, 2-60 mm, or of no size
recorded; NaN, unknown, when such a record has no abundance),
water_repellence, and at the site the coarse fragments of the
ground surface (surface_coarse_fragments_pct, all sizes, and
surface_gravel_pct; NA when none is recorded, NaN when a record has
no abundance) and the surveyors' family codes by position
(reference_asc_family, "B;E;M;O;V").
