Query soil/climate data from USDA-NRCS SCAN Stations
fetchSCAN(
site.code = NULL,
year = NULL,
report = "SCAN",
timeseries = c("Daily", "Hourly"),
...
)SCAN_sensor_metadata(site.code)
SCAN_site_metadata(site.code = NULL)
a list
of data.frame
objects, where each element name is a sensor type, plus a metadata
table; different report
types change the types of sensor data returned. SCAN_sensor_metadata()
and SCAN_site_metadata()
return a data.frame
. NULL
on bad request.
a vector of site codes. If NULL
SCAN_site_metadata()
returns metadata for all SCAN sites.
a vector of years
report name, single value only; default 'SCAN'
, other example options include individual sensor codes, e.g. 'SMS'
for Soil Moisture Storage, 'TEMP'
for temperature
either 'Daily'
or 'Hourly'
additional arguments. May include intervalType
, format
, sitenum
, interval
, year
, month
. Presence of additional arguments bypasses default batching functionality provided in the function and submits a 'raw' request to the API form.
D.E. Beaudette, A.G. Brown
Possible above and below ground sensor types include: 'SMS' (soil moisture), 'STO' (soil temperature), 'SAL' (salinity), 'TAVG' (daily average air temperature), 'TMIN' (daily minimum air temperature), 'TMAX' (daily maximum air temperature), 'PRCP' (daily precipitation), 'PREC' (daily precipitation), 'SNWD' (snow depth), 'WTEQ' (snow water equivalent),'WDIRV' (wind direction), 'WSPDV' (wind speed), 'LRADT' (solar radiation/langley total).
All Soil Climate Analysis Network (SCAN) sensor measurements are reported hourly.
Element Measured | Sensor Type | Precision |
Air Temperature | Shielded thermistor | 0.1 degrees C |
Barometric Pressure | Silicon capacitive pressure sensor | 1% |
Precipitation | Storage-type gage or tipping bucket | Storage: 0.1 inches; |
Relative Humidity | Thin film capacitance-type sensor | 1% |
Snow Depth | Sonic sensor (not on all stations) | 0.5 inches |
Snow Water Content | Snow pillow device and a pressure transducer (not on all stations) | 0.1 inches |
Soil Moisture | Dielectric constant measuring device. Typical measurements are at 2", 4", 8", 20", and 40" where possible. | 0.50% |
Soil Temperature | Encapsulated thermistor. Typical measurements are at 2", 4", 8", 20", and 40" where possible. | 0.1 degrees C |
Solar Radiation | Pyranometer | 0.01 watts per meter |
Wind Speed and Direction | Propellor-type anemometer | Speed: 0.1 miles per hour; Direction: 1 degree |
All Snow Telemetry (SNOTEL) sensor measurements are reported daily.
Element Measured | Sensor Type | Precision |
Air Temperature | Shielded thermistor | 0.1 degrees C |
Barometric Pressure | Silicon capacitive pressure sensor | 1% |
Precipitation | Storage-type gage or tipping bucket | Storage: 0.1 inches; Tipping bucket: 0.01 inches |
Relative Humidity | Thin film capacitance-type sensor | 1% |
Snow Depth | Sonic sensor | 0.5 inches |
Snow Water Content | Snow pillow device and a pressure transducer | 0.1 inches |
Soil Moisture | Dielectric constant measuring device. Typical measurements are at 2", 4", 8", 20", and 40" where possible. | 0.50% |
Soil Temperature | Encapsulated thermistor. Typical measurements are at 2", 4", 8", 20", and 40" where possible. | 0.1 degrees C |
Solar Radiation | Pyranometer | 0.01 watts per meter |
Wind Speed and Direction | Propellor-type anemometer | Speed: 0.1 miles per hour; Direction: 1 degree |
See the fetchSCAN tutorial for additional usage and visualization examples.
See the National Water and Climate Center home page for more information on the SCAN and SNOTEL programs, information on web services, and interactive maps of snow water equivalent, precipitation and streamflow.
if (FALSE) {
# get data
x <- try(fetchSCAN(site.code=c(356, 2072), year=c(2015, 2016)))
str(x)
# get sensor metadata
m <- SCAN_sensor_metadata(site.code=c(356, 2072))
# get site metadata
m <- SCAN_site_metadata(site.code=c(356, 2072))
# get hourly data (396315 records)
# x <- try(fetchSCAN(site.code=c(356, 2072), year=c(2015, 2016), timeseries = "Hourly"))
}
Run the code above in your browser using DataLab