-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsc_get_data.Rd
95 lines (79 loc) · 3.14 KB
/
sc_get_data.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sc_get_data.R
\name{sc_get_data}
\alias{sc_get_data}
\title{Get StreamCat data}
\usage{
sc_get_data(
comid = NULL,
metric = NULL,
aoi = NULL,
showAreaSqKm = NULL,
showPctFull = NULL,
state = NULL,
county = NULL,
region = NULL,
conus = NULL,
countOnly = NULL
)
}
\arguments{
\item{comid}{Return metric information for specific COMIDs. Needs to be a character string
and function will convert to this format if needed.
Syntax: comid=<comid1>,<comid2>}
\item{metric}{Name(s) of metrics to query
Syntax: name=<name1>,<name2>}
\item{aoi}{Specify the area of interest described by a metric. For riparian area (catrp100 and wsrp100)
if the metric does not have data for the riparian area, no data is returned for that AOI.
Certain metrics have no AOI specified for StreamCat so AOI needs to be left null. These
metrics are: BankfullDepth, BankfullWidth, CHEM_V2_1, CONN, HABT, HYD, ICI, IWI, TEMP, WettedWidth,
prg_bmmi, and all the mast, msst, mwst metrics
Syntax: areaOfInterest=<value1>,<value2>
Values: cat|ws|catrp100|wsrp100}
\item{showAreaSqKm}{Return the area in square kilometers of a given area of interest.
The default value is false.
Values: true|false}
\item{showPctFull}{Return the pctfull for each dataset. The default value is false.
Values: true|false}
\item{state}{Return metric information for COMIDs within a specific state. Use a state's abbreviation to
query for a given state.
Syntax: state=<state1>,<state2>}
\item{county}{Return metric information for COMIDs within a specific county.
Users must use the FIPS code, not county name, as a way to disambiguate counties.
Syntax: county=<county1>,<county1>}
\item{region}{Return metric information for COMIDs within a specified hydroregion.
Hydroregions are specified using full name i.e. 'Region01', 'Region03N', 'Region10L'
Syntax: region=<regionid1>,<regionid2>}
\item{conus}{Return all COMIDs in the conterminous United States.
The default value is false.
Values: true|false}
\item{countOnly}{Return a CSV containing only the row count (ROWCOUNT) and the column
count (COLUMNCOUNT) that the server expects to return in a request. The default value is false.
Values: true|false}
}
\value{
A data frame of StreamCat metrics
}
\description{
Function to return StreamCat catchment and watershed metrics using the StreamCat API. The function allows a user to get
specific metric data aggregated by area of interest, returned by comid(s), hydroregion(s), state(s), or county(ies).
}
\examples{
\donttest{
df <- sc_get_data(comid='179', aoi='cat', metric='fert')
df <- sc_get_data(metric='pctgrs2006', aoi='ws', region='Region01')
df <- sc_get_data(metric='pcturbmd2006', aoi='wsrp100',
comid='1337420')
df <- sc_get_data(metric='pcturbmd2006,damdens',
aoi='cat,ws', comid='179,1337,1337420')
df <- sc_get_data(metric='pcturbmd2006,damdens',
aoi='cat,ws', comid='179,1337,1337420',
showAreaSqKm=TRUE, showPctFull=TRUE)
df <- sc_get_data(metric='pcturbmd2006,damdens',
aoi='cat,ws', comid='179,1337,1337420', countOnly='true')
df <- sc_get_data(metric='ThalwagDepth', comid='179,1337,1337420',aoi='other')
}
}
\author{
Marc Weber
}