Chapter 11

Displaying Spatiotemporal Data: Introduction

Space-time datasets are indexed both in space and in time. The data may consist of a spatial vector object (for example, points or polygons) or raster data at different times. The first case is representative of data from fixed sensors providing measurements abundant in time but sparse in space. The second case is the typical format of satellite imagery, which produces high spatial resolution data sparse in time (E. Pebesma 2012).

There are several visualization approaches of space-time data trying to cope with the four dimensions of the data (Cressie and Wikle 2011).

On the one hand, the data can be conceived as a collection of snapshots at different times. These snapshots can be displayed as a sequence of frames to produce an animation, or can be printed on one page with different panels for each snapshot using the small-multiple technique described repeatedly in previous chapters.

On the other hand, one of the two spatial dimensions can be collapsed through an appropriate statistic (for example, mean or standard deviation) to produce a space-time plot (also known as a Hovmöller diagram). The axes of this graphic are typically longitude or latitude as the x-axis, and time as the y-axis, with the value of the spatial-averaged value of the raster data represented with color.

Finally, the space-time object can be reduced to a multivariate time series (where each location is a variable or column of the time series) and displayed with the time series visualization techniques described in the Part I. This approach is directly applicable to space-time data sparse in space (for example, point measurements at different times). However, it is mandatory to use aggregation in the case of raster data. In this case, the multivariate time series is composed of the evolution of the raster data averaged along a certain direction.

The next chapters, focused on raster space-time data (Chapter 12) and point space-time data (Chapter 13), illustrate with examples how to produce animations, multipanel graphics, hovmöller diagrams, and time-series with R.

11.1 Packages

The CRAN Tasks View “Handling and Analyzing Spatiotemporal Data”1 summarizes the packages for reading, vizualizing, and analyzing spacetime data. This section provides a brief introduction to the spacetime, raster, and rasterVis packages. Most of the information has been extracted from their vignettes, webpages, and help pages. You should read them for detailed information.

11.1.1 spacetime

The spacetime package (E. Pebesma 2012) is built upon the classes and methods for spatial data from the sp package, and for time series data from the xts package. It defines classes to represent four space-time layouts:

  1. STF, STFDF: full space-time grid of observations for spatial features and observation time, with all space-time combinations.
  2. STS, STSDF: sparse grid layout, stores only the non-missing spacetime combinations on a lattice
  3. STI, STIDF: irregular layout, time and space points of measured values have no apparent organisation.
  4. STT, STTDF: simple trajectories.

Moreover, spacetime provides several methods for the following classes:

  • stConstruct, STFDF, and STIDF create objects from single or multiple tables.
  • as coerces to other spatiotemporal objects, xts, Spatial, matrix, or data.frame.
  • [[ selects or replaces data values.
  • [ selects spatial or temporal subsets, and data variables.
  • over retrieves index or data values of one object at the locations and times of another.
  • aggregate aggregates data values over particular spatial, temporal, or spatiotemporal domains.
  • stplot creates spatiotemporal plots. It is able to produce multipanel plots, space-time plots, animations, and time series plots.

11.1.2 raster

The raster package (R. J. Hijmans 2013) is able to add time information associated with layers of a RasterStack or RasterBrick object with the setZ function. This information can be extracted with getZ.

If a Raster* object includes this information, the zApply function can be used to apply a function over a time series of layers of the object.

11.1.3 rasterVis

rasterVis (Oscar Perpiñán and R. Hijmans 2013) provides three methods to display spatiotemporal rasters:

  1. hovmoller produces Hovmöller diagrams (Hovmöller 1949). The axes of this kind of diagram are typically longitude or latitude (x-axis) and time (ordinate or y-axis) with the value of some aggregated field represented through color. However, the user can define the direction with dirXY and the summary function with FUN.
  2. horizonplot creates horizon graphs (Few 2008), with many time series displayed in parallel by cutting the vertical range into segments and overplotting them with color representing the magnitude and direction of deviation. Each time series corresponds to a geographical zone defined with dirXY and averaged with zonal.
  3. xyplot displays conventional time series plots. Each time series corresponds to a geographical zone defined with dirXY and aggregated with zonal.

On the other hand, the histogram, densityplot, and bwplot methods accept a FUN argument to be applied to the z slot of Raster* object (defined by setZ). The result of this function is used as the grouping variable of the plot to create different panels.

11.2 Further Reading

  • (Cressie and Wikle 2011) is a systematic approach to key quantitative techniques on statistics for spatiotemporal data. The book begins with separate treatments of temporal data and spatial data, and later combines these concepts to discuss spatiotemporal statistical methods. There is a chapter devoted to exploratory methods, including visualization techniques.
  • (E. Pebesma 2012) presents the spacetime package, which implements a set of classes for spatiotemporal data. This paper includes examples that illustrate how to import, subset, coerce, and export spatiotemporal data, proposes several visualization methods, and discusses spatiotemporal geostatistical interpolation.
  • (Slocum 2005) (previously cited in Chapter 7.2) includes a chapter about map animation, discussing several approaches for displaying spatiotemporal data.
  • (Hengl 2009) (previously cited in Chapter 7.2) includes a working example with spatiotemporal data to illustrate space-time variograms and interpolation.
  • (Harrower and Fabrikant 2008) explore the role of animation in geographic visualization and outline the challenges, both conceptual and technical, involved in the creation and use of animated maps.
  • The CRAN Tasks View “Handling and Analyzing Spatiotemporal Data” 2 summarizes the packages for reading, vizualizing, and analyzing space-time data. The R-SIG-Geo mailing list3 is a powerful resource for obtaining help.

1 http://cran.r-project.org/web/views/SpatioTemporal.html

2 http://cran.r-project.org/web/views/SpatioTemporal.html

3 https://stat.ethz.ch/mailman/listinfo/R-SIG-Geo/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.115.155