Last chance! 50% off unlimited learning
Sale ends in
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 SpatialPointsDataFrame.
sites(sos,
begin = NA,
end = NA,
phenomena = list(),
empty = FALSE,
includePhenomena = FALSE,
includeTemporalBBox = FALSE,
...)
A SOS object from a call to SOS
containing the URL of a SOS.
Object of class POSIXt
. Note that creating timestamps with as.POSIXct(..)
will use your local timezone.
Object of class POSIXt
. Note that creating timestamps with as.POSIXct(..)
will use your local timezone.
A list, vector or one-column data.frame with characters identifying the relevant phenomena.
Whether also empty sites shall be included in the response.
Whether the phenomena shall also be reported in the result.
Whether the observation containing timespan of each phenomenon shall also be reported.
Named parameters passed on to other wrapper functions.
A SpatialPointsDataFrame-class
containing all sites that match the filter conditions with corresponding metadata defined via the arguments. If empty = TRUE
, the data slot contains a logical column 'empty' indicating whether any data has been observed for this site. If listPhenomena = TRUE
, the data.frame contains a logical column per phenomenon indicating whether this specific phenomenon has been observed at that site. If includeTemporalBBox = TRUE
, the data.frame contains a two column data.frame with beginTime
and endTime
per phenomenon.
# NOT RUN {
mySos <- SOS(url = "https://climate-sos.niwa.co.nz/",
binding = "KVP", useDCPs = FALSE, version = "2.0.0")
sites(sos = mySos)
# }
Run the code above in your browser using DataLab