Archives for posts with tag: time series

Within the UncertWeb project the ifgi provides a SOS with parts of the AirBase dataset provided by the EEA. Release 0.1-15 contains a great demo on what you can do with that data: How to build up a spatial interpolation, in this case inverse distance weighting (IDW), on top of a GetObservation result. This comprises some data formatting and spatial projection.

Thanks go to Edzer Pebesma for contributing the interpolation examples using the packages gstat and spacetime and pointing out bugs in the package!

Some plots generated by the demo are:

  1. overview plot of the available offerings,
  2. a histogram of all downloaded NO2 values,
  3. a bubble plot of the data for Germany,
  4. the stations in Germany in an UTM projection,
  5. two IDW interpolations, one aggregated over time and one for a specific time stamp, and last but not least
  6. a time series plot for a whole year for one station including a polynomically fitted regression line.

Go ahead and run the analysis yourself:


library("sos4R")

demo("airquality")

Yesterday I successfully requested a time series from the WeatherSOS service! The code below shows how that works: First requesting the data (including using some help-functions to create time interval and access the features of the SOS), second plotting it using R’s plot function.

weathersos = SOS("http://v-swe.uni-muenster.de:8080/WeatherSOS/sos")
go.offering = sosOfferings(weathersos)[[4]] # ATHMOSPHERIC_TEMPERATURE
go.observedProperty = sosObservedProperties(weathersos)[[4]] # temperature urn
go.eventTime3 = sosCreateEventTime(sosCreateTimePeriod(sos = weathersos, begin = as.POSIXct("2010-09-16 18:00"), end = as.POSIXct("2010-09-20 18:00")))

obs3 <- getObservation(sos = weathersos,observedProperty = list(go.observedProperty),
procedure = list(sosProcedures(weathersos)[[1]]), eventTime = go.eventTime3, offering = go.offering@id)

obs3@result
# heureka!

summary(obs3@result) # finally!
plot(x = obs3@result[["Time"]], y = obs3@result[["urn:ogc:def:property:OGC::Temperature"]],
type = "l", main = "Temperature in Münster", xlab = "Time", ylab = "Temperature (°C)")

This is quite a milestone for the project, and a good start in this week. For today, spatial queries and testing (also other SOS instances) are on the agenda.