Exploratory Spatial Data Analysis (ESDA)

DMgtAsia · Session-II (2 of 2)

What is ESDA?

  • The spatial extension of Tukey’s exploratory data analysis.
  • Describe and visualise spatial distributions, find atypical locations, and reveal patterns of spatial association and heterogeneity (Anselin, 1999).
  • It is hypothesis-generating, not hypothesis-testing.

ESDA sits at the front of the workflow, before any spatial model.


Why spatial data needs its own EDA

Ordinary EDA assumes observations are independent. Spatial data usually are not.

  • Spatial dependence: near things are more related than distant things (Tobler’s First Law, 1970).
  • Spatial heterogeneity: distributions and relationships change across space.

Two cautions

  • Modifiable Areal Unit Problem (MAUP): results depend on how areas are bounded and aggregated.
  • Ecological fallacy: an area-level pattern need not hold for individuals within the area.

Name both when you present a map.


Exploratory vs Confirmatory

  • ESDA (now): descriptive, visual, generates hypotheses about where and how values cluster or differ.
  • Confirmatory (later): spatial regression / econometrics tests those hypotheses (Anselin, 1988; Haining, 2003).

Keep the two stages separate.


A short history

  • Tukey (1977): exploratory data analysis as visual, hypothesis-free description.
  • Openshaw et al. (1987): the Geographical Analysis Machine, automated cluster search.
  • Interactive graphics: REGARD, MANET, maps linked to plots (Bailey & Gatrell, 1995).
  • Software: SpaceStat, then GeoDa (Anselin et al., 2006), and spdep in R.

Core ESDA: three ways of looking

  1. Map the spatial distribution (the choropleth from the previous section).
  2. Link plots to the map: brush a box plot or scatter plot and the same areas highlight.
  3. Spot atypical locations: a value unlike its neighbours is a spatial outlier.

These lead to one question: is there spatial pattern at all?


Neighbours and the spatial lag

  • To make a method spatial, encode geography as a spatial weights matrix W: who is a neighbour, and how strongly.
  • The spatial lag of a variable is the (weighted) average of its neighbours.
  • Plotting a value against its spatial lag is the first quantitative ESDA step.

Global autocorrelation, by hand

Run this in R and change the values: watch Moran’s I move from independence (near 0) toward clustering (toward +1).

# Four regions in a row: 1-2-3-4
y <- c(2, 3, 8, 9)                       # try c(2, 9, 3, 8) for a "checkerboard"

W <- matrix(c(0,1,0,0,
              1,0,1,0,
              0,1,0,1,
              0,0,1,0), nrow = 4, byrow = TRUE)   # who neighbours whom
Wr <- W / rowSums(W)                     # row-standardised weights

z   <- y - mean(y)                       # centre the values
lag <- as.vector(Wr %*% y)               # spatial lag = neighbour average
lag
[1] 3 5 6 8
moran_I <- sum(z * (Wr %*% z)) / sum(z^2)
moran_I                                  # global Moran's I
[1] 0.5405405

We introduce live, in-browser webR cells (runnable here, embeddable in Moodle as iframes) in Session-III.


Reading global Moran’s I

  • I > 0: similar values sit together (clustering of highs and of lows).
  • I ≈ 0: no spatial pattern (spatial randomness).
  • I < 0: neighbours are dissimilar (a checkerboard).

It answers yes/no, is there pattern. It does not say where.


ESDA in public health

  • Map disease rates, flag candidate hot spots, and form hypotheses about drivers before modelling (Delmelle & Kanaroglou, 2013).
  • Central to surveillance: which areas may be at risk?
  • Extends to space and time (for example, dengue across districts of Punjab, India).
  • Connects directly to NFHS and notification data at district / facility level.

What comes next (later session)

  • From one global number to local indicators that say where the clusters are: local Moran’s I and the LISA map, and Getis-Ord hot spots (Anselin, 1995).
  • That is the Spatial Data Analysis & Clustering session. We stop here, at the exploratory stage.

Key references

  • Tukey, J.W. (1977). Exploratory Data Analysis. Addison-Wesley.
  • Tobler, W. (1970). A computer movie simulating urban growth. Economic Geography 46.
  • Anselin, L. (1988). Spatial Econometrics. Kluwer.
  • Anselin, L. (1999). Interactive techniques and ESDA. In Geographical Information Systems.
  • Bailey, T.C. & Gatrell, A.C. (1995). Interactive Spatial Data Analysis. Longman.
  • Haining, R. (2003). Spatial Data Analysis: Theory and Practice. Cambridge.
  • Anselin, Syabri & Kho (2006). GeoDa. Geographical Analysis 38.

Recap

  • ESDA spatialises EDA and is hypothesis-generating.
  • Spatial data is special: dependence and heterogeneity; mind MAUP and the ecological fallacy.
  • Look three ways (map, link, spot outliers), then ask global Moran’s I: is there pattern?
  • Where the clusters are comes next, with LISA.