getData.Rd
For given sites and phenomena, a SOS is queried and the data returned as data.frame.
getData(sos, phenomena, sites, spatialBBox = NA, begin = NA, end = NA, ...)
sos | An SOS object from a call to |
---|---|
phenomena | A list, vector or one-column data.frame with characters identifying the relevant phenomena. |
sites | A list, vector or one-column data.frame with characters identifying the relevant sites. |
spatialBBox | A 2-by-2 matrix with |
begin | Object of class |
end | Object of class |
... | Named arguments forwarded to other wrapper functions internally. |
A data.frame containing the data in long form where each row contains a siteID
, the time stamp of the observation and the observed measurements for each phenomenon in a separate column. The measurements are provided with units using units
.
if (FALSE) { mySos <- SOS(url = "https://climate-sos.niwa.co.nz/", binding = "KVP", useDCPs = FALSE, version = "2.0.0") observationData <- getData(sos = mySos, phenomena = phenomena[18,1], sites = siteList[1:2,1]) }