fetchSCAN: Fetch SCAN Data

Description Usage Arguments Details Value Note Author(s) References Examples

Description

Query soil/climate data from USDA-NRCS SCAN Stations (experimental)

Usage

1
fetchSCAN(req)

Arguments

req

a vector of named characters or list of named characters, e.g. c(intervalType=' View Historic ', report='STO', timeseries='Daily', format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')

Details

An attempt is made to parse the column names from the data returned from the SCAN webservice. The data returned will depend on the report submitted. Column names contain the code (I, D, H):

Daily sensors (e.g. TAVG.D-1) report a summary value for the previous day. Hourly sensors (e.g. TAVG.H-1) report a summary value for the previous hour. Instantaneous sensors (e.g. TOBS.I-1) report a single observation on the hour.

Some of the available reports include: SCAN, ALL, SOIL, SMS, STO, PREC, WEATHER, WIND, SOLAR.

See examples, details pending.

Value

a data.frame object

Note

This is still an experimental function.

Author(s)

D.E. Beaudette

References

http://www.wcc.nrcs.usda.gov/scan/

Examples

 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
## Not run: 
# all sensors
req <- c(intervalType=' View Historic ', report='ALL', timeseries='Daily', 
format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')

# standard SCAN report
req <- c(intervalType=' View Historic ', report='SCAN', timeseries='Daily', 
format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')

# soil / air temps
req <- c(intervalType=' View Historic ', report='STO', timeseries='Daily', 
format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')

# soil moisture + precip
req <- c(intervalType=' View Historic ', report='SMS', timeseries='Daily', 
format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')

# soil moisture, hourly: careful, lots of data!
req <- c(intervalType=' View Historic ', report='SMS', timeseries='Hourly', 
format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')

# get data, format into DF
x <- fetchSCAN(req)

## End(Not run)

soilDB documentation built on May 2, 2019, 5:17 p.m.