Learn R Programming

sos4R (version 0.4.2)

phenomena: Function retrieve phenomena of a SOS v2.0

Description

This function queries a SOS v2.0 for all its phenomena

Usage

phenomena(sos, includeTemporalBBox = FALSE, includeSiteId = FALSE, ...)

Arguments

sos

An SOS object from a call to SOS containing the URL of a SOS.

includeTemporalBBox

Whether the observation containing timespan of each phenomenon shall also be reported.

includeSiteId

Whether the sites shall be reported at which each phenomenon has been observed.

...

Named arguments forwarded to other wrapper functions internally.

Value

If only the argument sos is provided, this function returns a character vector with the phenomenon ids.

If timeInfo = TRUE, the result is a data.frame where the character vector of phenomena is combined with a character columns beginTime and endTime. Note that these two columns indicate the very beginning and end of any time series recorded for each phenomenon across all sites and does not imply any continuity.

If sites = TRUE, the result is a data.frame where the character vector of phenomena is combined with a character column siteID. Phenomena that have been observed at several sites will be replicated for each site. If also timeInfo = TRUE, the data.frame will have character columns beginTime and endTime per phenomenon and site. Note that these two columns indicate the very beginning and end of any time series recorded for each phenomenon at each site, but does still not imply to be continuous series.

Examples

Run this code
# NOT RUN {
mySos <- SOS(url = "https://climate-sos.niwa.co.nz/",
             binding = "KVP", useDCPs = FALSE, version = "2.0.0")

phenomena(sos = mySos)
# }

Run the code above in your browser using DataLab