Learn R Programming

soilDB (version 2.6.9)

fetchSCAN: Get data from USDA-NRCS SCAN (Soil Climate Analysis Network) Stations

Description

Query soil/climate data from USDA-NRCS SCAN Stations

Usage

fetchSCAN(site.code, year, report = "SCAN", req = NULL)

Arguments

site.code

a vector of site codes

year

a vector of years

report

report name, single value only

req

list of SCAN request parameters, for backwards-compatibility only

Value

a data.frame object; NULL on bad request.

Details

See the fetchSCAN tutorial for details. These functions require the httr and rvest libraries.

References

https://www.wcc.nrcs.usda.gov/index.html

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
if(requireNamespace("curl") &
    curl::has_internet()) {

    # get data: new interface
    x <- 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))
}
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab