-
Notifications
You must be signed in to change notification settings - Fork 19
/
fetchSDA.Rd
130 lines (111 loc) · 3.87 KB
/
fetchSDA.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_component_from_SDA.R,
% R/get_cosoilmoist_from_SDA.R
\name{get_component_from_SDA}
\alias{get_component_from_SDA}
\alias{get_cointerp_from_SDA}
\alias{get_legend_from_SDA}
\alias{get_lmuaoverlap_from_SDA}
\alias{get_mapunit_from_SDA}
\alias{get_chorizon_from_SDA}
\alias{fetchSDA}
\alias{get_cosoilmoist_from_SDA}
\title{Get SSURGO/STATSGO2 Mapunit Data from Soil Data Access}
\usage{
get_component_from_SDA(
WHERE = NULL,
duplicates = FALSE,
childs = TRUE,
droplevels = TRUE,
nullFragsAreZero = TRUE,
stringsAsFactors = NULL
)
get_cointerp_from_SDA(
WHERE = NULL,
mrulename = NULL,
duplicates = FALSE,
droplevels = TRUE,
stringsAsFactors = NULL
)
get_legend_from_SDA(WHERE = NULL, droplevels = TRUE, stringsAsFactors = NULL)
get_lmuaoverlap_from_SDA(
WHERE = NULL,
droplevels = TRUE,
stringsAsFactors = NULL
)
get_mapunit_from_SDA(WHERE = NULL, droplevels = TRUE, stringsAsFactors = NULL)
get_chorizon_from_SDA(
WHERE = NULL,
duplicates = FALSE,
childs = TRUE,
nullFragsAreZero = TRUE,
droplevels = TRUE,
stringsAsFactors = NULL
)
fetchSDA(
WHERE = NULL,
duplicates = FALSE,
childs = TRUE,
nullFragsAreZero = TRUE,
rmHzErrors = FALSE,
droplevels = TRUE,
stringsAsFactors = NULL
)
get_cosoilmoist_from_SDA(
WHERE = NULL,
duplicates = FALSE,
impute = TRUE,
stringsAsFactors = NULL
)
}
\arguments{
\item{WHERE}{text string formatted as an SQL WHERE clause (default: FALSE)}
\item{duplicates}{logical; if TRUE a record is returned for each unique
mukey (may be many per nationalmusym)}
\item{childs}{logical; if FALSE parent material and geomorphic child tables
are not flattened and appended}
\item{droplevels}{logical: indicating whether to drop unused levels in
classifying factors. This is useful when a class has large number of unused
classes, which can waste space in tables and figures.}
\item{nullFragsAreZero}{should fragment volumes of NULL be interpreted as 0?
(default: TRUE), see details}
\item{stringsAsFactors}{deprecated}
\item{mrulename}{character. Interpretation rule names}
\item{rmHzErrors}{should pedons with horizonation errors be removed from the
results? (default: FALSE)}
\item{impute}{replace missing (i.e. \code{NULL}) values with \code{"Not_Populated"} for categorical data, or the "RV" for numeric data or \code{201} cm if the "RV" is also\code{NULL} (default: \code{TRUE})}
}
\value{
A data.frame or SoilProfileCollection object.
}
\description{
Functions to download and flatten commonly used tables and from Soil Data
Access, and create soil profile collection objects (SPC).
}
\details{
These functions return data from Soil Data Access with the use of a simple
text string that formatted as an SQL WHERE clause (e.g. \code{WHERE =
"areasymbol = 'IN001'"}. All functions are SQL queries that wrap around
\code{SDAquery()} and format the data for analysis.
Beware SDA includes the data for both SSURGO and STATSGO2. The
\code{areasymbol} for STATSGO2 is \code{US}. For just SSURGO, include
\code{WHERE = "areareasymbol != 'US'"}.
If the duplicates argument is set to TRUE, duplicate components are
returned. This is not necessary with data returned from NASIS, which has one
unique national map unit. SDA has duplicate map national map units, one for
each legend it exists in.
The value of \code{nullFragsAreZero} will have a significant impact on the
rock fragment fractions returned by \code{fetchSDA}. Set
\code{nullFragsAreZero = FALSE} in those cases where there are many
data-gaps and NULL rock fragment values should be interpreted as NULLs. Set
\code{nullFragsAreZero = TRUE} in those cases where NULL rock fragment
values should be interpreted as 0.
Additional examples can be found in the \href{http://ncss-tech.github.io/AQP/soilDB/SDA-tutorial.html}{Soil Data Access (SDA) Tutorial}
}
\seealso{
\link{SDA_query}
}
\author{
Stephen Roecker
}
\keyword{manip}