plotESDA: Plots for exploratory spatial data analysis (ESDA)

View source: R/plotESDA.R

plotESDAR Documentation

Plots for exploratory spatial data analysis (ESDA)

Description

Create four plots for exploratory spatial data analysis (ESDA): histogram + density plot, bubble plot, variogram plot, and variogram map.

Usage

plotESDA(
  z,
  lat,
  lon,
  lags = NULL,
  cutoff = NULL,
  width = c(cutoff/20),
  leg.pos = "right"
)

Arguments

z

Vector of numeric values of the variable for with ESDA plots should be created.

lat

Vector of numeric values containing the y coordinate (latitude) of the point locations where the z variable was observed.

lon

Vector of numeric values containing the x coordinate (longitude) of the point locations where the z variable was observed.

lags

(optional) Numerical vector; upper boundaries of lag-distance classes. See argument boundaries of gstat::variogram() for more info.

cutoff

(optional) Integer value defining the spatial separation distance up to which point pairs are included in semi-variance estimates. Defaults to the length of the diagonal of the box spanning the data divided by three.

width

Integer value specifying the width of subsequent distance intervals into which data point pairs are grouped for semi-variance estimates. Defaults to width = cutoff / 20.

leg.pos

(optional) Character value indication the location of the legend of the bubble plot. Defaults to leg.pos = "right".

Details

The user should visit the help pages of gstat::variogram(), plotHD(), sp::bubble() and sp::spplot() to obtain more details about the main functions used to built plotESDA().

Value

Four plots: histogram and density plot, bubble plot, empirical variogram, and variogram map.

Dependencies

The sp package, provider of classes and methods for spatial data in R, is required for plotESDA() to work. The development version of the sp package is available on https://github.com/edzer/sp/ while its old versions are available on the CRAN archive at https://cran.r-project.org/src/contrib/Archive/sp/.

The gstat package, provider of methods for spatial and spatio-temporal geostatistical modelling, prediction and simulation in R, is required for plotESDA() to work. The development version of the sp package is available on https://github.com/r-spatial/gstat while its old versions are available on the CRAN archive at https://cran.r-project.org/src/contrib/Archive/gstat/.

Author(s)

Alessandro Samuel-Rosa alessandrosamuelrosa@gmail.com

References

Cressie, N.A.C. (1993) Statistics for Spatial Data. New York: John Wiley and Sons, p.900, 1993.

Pebesma, E.J. (2004) Multivariable geostatistics in S: the gstat package. Computers and Geosciences, 30:683-691, 2004.

Webster, R., Oliver, M.A. Geostatistics for environmental scientists. Chichester: John Wiley and Sons, p.315, 2007.

See Also

plotHD()

Examples

if (all(require(sp), require(gstat))) {
  data(meuse, package = "sp")
  p <- plotESDA(z = meuse$zinc, lat = meuse$y, lon = meuse$x)
}

pedometrics documentation built on June 19, 2022, 9:05 a.m.