fetchHenry {soilDB}R Documentation

Download Data from the Henry Mount Soil Climate Database (experimental)

Description

This function is a front-end to the REST query functionality of the Henry Mount Soil Climate Database.

Usage

fetchHenry(usersiteid = NULL, project = NULL, type = "soiltemp", gran = "day", 
start.date = NULL, stop.date = NULL, 
pad.missing.days = TRUE, soiltemp.summaries = TRUE)

Arguments

usersiteid

(optional) filter results using a NASIS user site ID

project

(optional) filter results using a project ID

type

sensor type, currently only "soiltemp" is supported

gran

data granularity: "day", "week", "month", "year"; returned data are averages

start.date

(optional) starting date filter

stop.date

(optional) ending date filter

pad.missing.days

should missing data ("day" granularity) be filled with NA? see details

soiltemp.summaries

should soil temperature ("day" granularity only) be summarized? see details

Details

Filling missing days with NA is useful for computing and index of how complete the data are, and for estimating (mostly) unbiased MAST and seasonal mean soil temperatures. Summaries are computed by first averaging over Julian day, then averaging over all days of the year (MAST) or just those days that occur within "summer" or "winter". This approach makes it possible to estimate summaries in the presence of missing data. The quality of summaries should be weighted by the number of "functional years" (number of years with non-missing data after combining data by Julian day) and "complete years" (number of years of data with >= 365 days of non-missing data).

Value

a list containing:

sites

a SpatialPointsDataFrame object containing site-level information

soiltemp

a data.frame object containing soil temperature timeseries data

Note

This function and the back-end database are very much a work in progress.

Author(s)

D.E. Beaudette

See Also

fetchSCAN

Examples

## Not run: 
##D library(lattice)
##D 
##D # get CA630 data as daily averages
##D x <- fetchHenry(project='CA630', gran = 'day')
##D 
##D # inspect data gaps
##D levelplot(factor(!is.na(sensor_value)) ~ doy * factor(year) | id, 
##D data=x$soiltemp, col.regions=c('grey', 'RoyalBlue'), cuts=1, 
##D colorkey=FALSE, as.table=TRUE, scales=list(alternating=3), 
##D par.strip.text=list(cex=0.75), strip=strip.custom(bg='yellow'), 
##D xlab='Julian Day', ylab='Year')
## End(Not run)

[Package soilDB version 1.6.3 Index]