fetchOSD | R Documentation |
This function fetches a variety of data associated with named soil series, extracted from the USDA-NRCS Official Series Description text files and detailed soil survey (SSURGO). These data are updated quarterly and made available via SoilWeb. Set extended = TRUE
and see the soilweb.metadata
list element for information on when the source data were last updated.
fetchOSD(soils, colorState = "moist", extended = FALSE)
soils |
a character vector of named soil series; case-insensitive |
colorState |
color state for horizon soil color visualization: "moist" or "dry" |
extended |
if |
The standard set of "site" and "horizon" data are returned as a SoilProfileCollection
object (extended = FALSE
). The "extended" suite of summary data can be requested by setting extended = TRUE
. The resulting object will be a list
with the following elements:
SoilProfileCollection
containing standards "site" and "horizon" data
competing soil series from the SC database snapshot
geographically associated soils, extracted from named section in the OSD
empirical probabilities for geomorphic component, derived from the current SSURGO snapshot
empirical probabilities for hillslope position, derived from the current SSURGO snapshot
empirical probabilities for mountain slope position, derived from the current SSURGO snapshot
empirical probabilities for river terrace position, derived from the current SSURGO snapshot
empirical probabilities for flat landscapes, derived from the current SSURGO snapshot
empirical probabilities for surface shape (across-slope) from the current SSURGO snapshot
empirical probabilities for surface shape (down-slope) from the current SSURGO snapshot
empirical probabilities for parent material kind, derived from the current SSURGO snapshot
empirical probabilities for parent material origin, derived from the current SSURGO snapshot
empirical MLRA membership values, derived from the current SSURGO snapshot
area cross-tabulation of ecoclassid by soil series name, derived from the current SSURGO snapshot, major components only
climate summaries from PRISM stack (CONUS only)
select quantiles of NCCPI and Irrigated NCCPI, derived from the current SSURGO snapshot
metadata associated with SoilWeb cached summaries
When using extended = TRUE
, there are a couple of scenarios in which series morphology contained in SPC
do not fully match records in the associated series summary tables (e.g. competing
).
- Climate summaries are empty data.frames
because these summaries are currently generated from PRISM. We are working on a solution that uses DAYMET.
- Extended summaries are present but morphology missing from SPC
. A warning is issued.
These last two cases are problematic for analysis that makes use of morphology and extended data, such as outlined in this tutorial on competing soil series.
a SoilProfileCollection
object containing basic soil morphology and taxonomic information.
Requests to the SoilWeb API are split into batches of 100 series names from soils
via makeChunks()
.
D.E. Beaudette, A.G. Brown
USDA-NRCS OSD search tools: https://soilseries.sc.egov.usda.gov/
OSDquery()
, siblings()
library(aqp)
# soils of interest
s.list <- c('musick', 'cecil', 'drummer', 'amador', 'pentz',
'reiff', 'san joaquin', 'montpellier', 'grangeville', 'pollasky', 'ramona')
# fetch and convert data into an SPC
s.moist <- fetchOSD(s.list, colorState='moist')
s.dry <- fetchOSD(s.list, colorState='dry')
# plot profiles
# moist soil colors
par(mar=c(0,0,0,0), mfrow=c(2,1))
plot(s.moist, name='hzname',
cex.names=0.85, axis.line.offset=-4)
plot(s.dry, name='hzname',
cex.names=0.85, axis.line.offset=-4)
# extended mode: return a list with SPC + summary tables
x <- fetchOSD(s.list, extended = TRUE, colorState = 'dry')
par(mar=c(0,0,1,1))
plot(x$SPC)
str(x, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.