fetchSCAN {soilDB} | R Documentation |
Query soil/climate data from USDA-NRCS SCAN Stations (experimental)
fetchSCAN(req)
req |
a vector of named characters, e.g. c(intervalType=' View Historic ', report='STO', timeseries='Daily', format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY') |
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.
a data.frame
object
This is still an experimental function.
D.E. Beaudette
http://www.wcc.nrcs.usda.gov/scan/
## Not run:
##D # all sensors
##D req <- c(intervalType=' View Historic ', report='ALL', timeseries='Daily',
##D format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')
##D
##D # standard SCAN report
##D req <- c(intervalType=' View Historic ', report='SCAN', timeseries='Daily',
##D format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')
##D
##D # soil / air temps
##D req <- c(intervalType=' View Historic ', report='STO', timeseries='Daily',
##D format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')
##D
##D # soil moisture + precip
##D req <- c(intervalType=' View Historic ', report='SMS', timeseries='Daily',
##D format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')
##D
##D # soil moisture, hourly: careful, lots of data!
##D req <- c(intervalType=' View Historic ', report='SMS', timeseries='Hourly',
##D format='copy', sitenum='2072', interval='YEAR', year='2011', month='CY')
##D
##D # get data, format into DF
##D x <- fetchSCAN(req)
## End(Not run)