Description Usage Arguments Details Value Note Author(s) References Examples
Query soil/climate data from USDA-NRCS SCAN Stations (experimental)
1 | fetchSCAN(req)
|
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') |
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/
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.