Get mapunit ecological sites from Soil Data Access
Source:R/get_SDA_coecoclass.R
get_SDA_coecoclass.Rd
Get mapunit ecological sites from Soil Data Access
Usage
get_SDA_coecoclass(
method = "None",
areasymbols = NULL,
mukeys = NULL,
WHERE = NULL,
query_string = FALSE,
ecoclasstypename = c("NRCS Rangeland Site", "NRCS Forestland Site"),
ecoclassref = "Ecological Site Description Database",
not_rated_value = "Not assigned",
miscellaneous_areas = TRUE,
include_minors = TRUE,
threshold = 0,
dsn = NULL
)
Arguments
- method
aggregation method. One of:
"Dominant Component"
,"Dominant Condition"
,"All"
or"None"
(default). Ifmethod="all"
multiple numbered columns represent site composition within each map unit e.g.site1...
,site2...
. Ifmethod="none"
is selected one row will be returned per component; in all other cases one row will be returned per map unit.- areasymbols
vector of soil survey area symbols
- mukeys
vector of map unit keys
- WHERE
character containing SQL WHERE clause specified in terms of fields in
legend
,mapunit
,component
orcoecosite
tables, used in lieu ofmukeys
orareasymbols
- query_string
Default:
FALSE
; ifTRUE
return a character string containing query that would be sent to SDA viaSDA_query
- ecoclasstypename
Default:
c("NRCS Rangeland Site", "NRCS Forestland Site")
. IfNULL
no constraint onecoclasstypename
is used in the query.- ecoclassref
Default:
"Ecological Site Description Database"
. IfNULL
no constraint onecoclassref
is used in the query.- not_rated_value
Default:
"Not assigned"
- miscellaneous_areas
logical. Include miscellaneous areas (non-soil components)?
- include_minors
logical. Include minor components? Default:
TRUE
.- threshold
integer. Default:
0
. Minimum combined component percentage (RV) for inclusion of a mapunit's ecological site in wide-format tabular summary. Used only formethod="all"
.- dsn
Path to local SQLite database or a DBIConnection object. If
NULL
(default) use Soil Data Access API viaSDA_query()
.
Details
When method="Dominant Condition"
an additional field ecoclasspct_r
is returned in the result
with the sum of comppct_r
that have the dominant condition ecoclassid
. The component with the greatest
comppct_r
is returned for the component
and coecosite
level information.
Note that if there are multiple coecoclasskey
per ecoclassid
there may be more than one record per component.