Archives for posts with tag: sp

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")

I intended to do a nice demo with CSIRO’s South Esk Testbed. But I got stuck with a long planned feature – the plotting of offerings and SOS. So this is what this demo is about now, and additionally it shows how to combine measurements of different SOSs and convert these to sp objects for further analysis. Below is a map of the available sensors.

CSIRO South Esk Testbed Map

It must be noted that the focus of the demo is on data consolidation and plotting. The demo contains code for two Kriging examples using the gstat and automap packages, which sadly I did not get to work yet. These analyses are not necessarily sensible!

Try it out:


library("sos4R")

demo("southesk")

Some example plots:

The demo will be in a soon to be released new version of sos4R, but the documentation needs to be updated before uploading it to CRAN. Read the rest of this entry »

The topic of today’s post looks ahead in the project a little bit. Within the 52° North Geostatistics Community we currently design a model for spatio-temporal data in R. In other words, how one can save and easily access and query information from a common data structure for data with both a spatial and a temporal component.

This naturally relates to the sos4R project, as it would be great to return exactly these classes as the result of a query to a sensor observation service. On the one side, I do not have to implement these classes alone, on the other side I can count on the R community to develop transformation functions from such a common data model into data structures that can be the basis for a manifold of analyses. I see these output formats as an important part for the acceptance of sos4R in the community.

Our efforts are at a very early stage, but I hope I will be able to contribute as much as I can. We started with an examination of the available R packages for time series and time formats and we think we can use some of them (even if only as orientation). Whether we want to be dependent on one of these packages or rather provide conversion functions is still part of the discussion.

You can check out the current status (not much at the moment despite a graphic with the class structure!) of the package sptX from the 52° North SVN here and participate via the geostatistics mailing list. The goal is to provide classes that are compatible with sp (class conversion etc.) and support various time series and spatial data formats, both regular as well as irregular kinds. sos4R will probably one of the first applications of this package.