dylanbeaudette / process-kssl-snapshot

code, documentation, models, related to processing the KSSL DB snapshot
5 stars 2 forks source link

Generate a KSSL pedon database for SoilWeb from the USDA-NRCS-NCSS snapshot

I periodically "process" the NCSS-KSSL characterization data snapshot (usually quarterly) into a consolidated chunk of data that are used within SoilWeb and by fetchKSSL(). This snapshot is typically delivered as an Access database and contains a mixture of: the latest "lab" data from LIMS, and the latest taxonomic and spatial data from NASIS. The resulting "processed" data include over 50 attributes, split into chunks that roughly approximate the "site/pedon" and "horizon" objects.

There is a new ESRI FileGeoDatabase KSSL snapshot available. There will soon be an SQLite version as well.

Snapshots:

News

Data Cleaning

As part of the "processing" of these data, a number of data cleaning operations are performed.

Taxonname

A new field caled taxonname is added. This field is set to the correlated_as value when not null and not "unnamed". Otherwise, the taxonname field is set to the value in sampled_as.

Horizonation

  1. Missing lower horizon depths are replaced with the corrosponding top depth + 1cm.
  2. "O" horizons using the old-style notation, with top depths > bottom depths, are removed. Sorry.

MLRA and State Data

State and MLRA codes are added to the data using spatial overlay with the most recent US states and NRCS MLRA maps.

Estimated Properties

  1. K saturation is computed via ex_k / base_sum
  2. total C and N values of 0 are replaced by NA
  3. organic C estimated via with(h, ifelse(is.na(oc), c_tot - (ifelse(is.na(caco3), 0, caco3) * 0.12), oc))
  4. organic matter estimated via estimated_oc * 1.724
  5. C:N estimated via h$estimated_oc / h$n_tot
  6. pH (1:1 H2O) estimated when missing via saturated paste pH (pedotransfer function)

alt text alt text

  1. base saturation (pH 8.2) calculated when missing:
    • h$bs82.computed <- with(h, (ex_ca + ex_mg + ex_na + ex_k) / (ex_ca + ex_mg + ex_na + ex_k + acid_tea)) * 100

alt text

Data Elements

Horizon Attributes:

Site/Pedon Attributes:

Morphologic (field-described) Attributes: