siteList: This function queries a SOS v2.0 for its sites and returns...

Description Usage Arguments Value Author(s) Examples

Description

Information about the registered sites in a SOS can be queried using this function. This function allows for different levels of detail and returns a vector or data.frame.

Usage

1
2
3
4
5
6
7
8
siteList(sos,
         empty = FALSE,
         begin = NA,
         end = NA,
         phenomena = list(),
         includePhenomena = FALSE,
         includeTemporalBBox = FALSE,
         ...)

Arguments

sos

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

empty

Whether also empty sites shall be included in the response.

begin

Object of class POSIXt. Note that creating timestamps with as.POSIXct(..) will use your local timezone.

end

Object of class POSIXt. Note that creating timestamps with as.POSIXct(..) will use your local timezone.

phenomena

A list, vector or one-column data.frame with characters identifying the relevant phenomena.

includePhenomena

Whether the phenomena shall also be reported in the result.

includeTemporalBBox

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

...

Named parameters passed on to other wrapper functions.

Value

If only the argument sos is provided and the flag empty is set to TRUE or FALSE, this function returns a character vector with the site ids.

If listPhenomena = TRUE, the data.frame contains the column containing the site ids and a character column phenomenon where sites with several phenomena are repeated for each of their phenomenon.

If includeTemporalBBox = TRUE, the data.frame also contains two character columns beginTime and endTime indicating per site id and phenomenon its earliest and latest observation time point.

Author(s)

Benedikt Graeler, Eike Hinderk Juerrens

Examples

1
2
3
4
5
6
## Not run: 
mySos <- SOS(url = "https://climate-sos.niwa.co.nz/",
             binding = "KVP", useDCPs = FALSE, version = "2.0.0")
siteList(sos = mySos)

## End(Not run)

sos4R documentation built on July 9, 2020, 5:07 p.m.