TTT : Visualizing W. Tobler's "first law of geography" ? - Spatial autocorrelation

"I invoke the first law of geography: everything is related to everything else, but near things are more related than distant things."

Table of Contents

W. Tobler introduced this idea somewhat jokingly at an International Geographical Union meeting in 1969, on the first ideas about using a computer in geography, and then explored it further in a 1970 paper. This hypothesis has become a fertile research question, which has produced many other publications. It had already appeared with R.A. Fisher in 1935, but had not had the favorable context of geomatics to develop.

This "law" is the source of concepts as spatial dependency, effect distance ponderation and other analysis of the role of geographical space and distance. Here, we will focus on the family of indicators which are directly linked to the concept of spatial relations : spatial autocorrelation.

Spatial autocorrelation is a measure of the effect of distance to the intensity of the relation between objects. It implies a spatial variable and a distance metric, a mean to take into account the distance between objects, which can take several forms.

Several indicators were proposed by the research, we will present and visualize them using a statistical dataset about housing in the French metropolitan départements (source INSEE and IGN).

First application example: global indicators

To start our analysis, let's represent a spatially heterogeneous variable: the proportion of second homes in 2019's total housing:

Distance (km) Prop. of second homes in 2019 Housing % Sources : INSEE, IGN
200 5.5 10

Quite clearly, the departments with higher values are those with amenities for tourism: coastline, mountains. The departments are sometimes grouped into areas with similar values, such as the Northeast (low %) or the Alps and Corsica (high %).

One can assess the spatial autocorrelation by calculating global indicators, producing a single value for the entire dataset.

Geary's contiguity indicator

The contiguity indicator of Geary, or Geary's C, was developed by Roy C. Geary in 1954. It measures the difference between the values of the spatial entities (the departments), weighted by a distance metric and related to the deviations of the entity values from the mean. If less than 1, it expresses a positive spatial autocorrelation: close objects present values more similar than distant objects.

(Cf. the Wikipedia article: Geary's C).

It's a global indicator qualifying the entire dataset, but it is relatively sensitive to local autocorrelation groups.

Below, we calculate it with a distance weighting metric based on the inverse distance of neighboring entities (adjacent).

Gearys_C_invd = 0.36

With a inverse squared distance (like gravity in physics), the Geary's C indicator is higher, the autocorrelation is lesser:

Gearys_C_g = 0.418

By using a weighting metric based on the inverse distance of neighbors with a distance threshold, one can observe the variation of the Geary's C indicator:

Gearys_C_s = 0.643

Moran's I spatial autocorrelation indice

In 1950, Patrick Moran develops a global autocorrelation indice, the I, which is less sensitive to local groups of values. It is based on the sum of the deviations from the mean of the elements of the dataset, weighted by a distance metric, related to the sum of the weights. Cf. the Wikipedia article: Moran's I

The Moran's I fluctuates between -1 to 1, with a negative spatial autocorrelation below 0 (close entities have very different values).

Used on the proportion of second homes, with the inverse distance weighting metric, it shows a value near 0.5:

Moran_I_idv = 0.429

With the gravity weighting metric, the value decreases a bit:

Moran_I_g = 0.35

One can, here too, test the indicator with a distance threshold for the inverse distance weighting:

Moran_I_g_th = 0.184

The calculation of this indicator allows also the production of expected values, therefore also deviations from them, to express the significance of the results:

Moran_I_g_th_expected = -0.011

Moran_I_g_th_zscore = 6.801

Local indicators of spatial autocorrelation

Luc Anselin developed the field of spatial econometrics and proposed in 1995 the idea of Local Indicators of Spatial Association, LISA (Anselin, 1995), to further exploratory data analysis with the help of computers.

Local Moran's I

The principal LISA indicator is the local version of the Moran's I: for each entity of the dataset, we will calculate a value of the I, using a selection of neighboring entities and a weighting metric to set the range of the local autocorrelation measure.

Results

Distance (km) Prop. of second homes in 2019 (local Moran's I) Indicator Sources : INSEE, IGN
200 -0.0087 0.036

As for the global Moran's I, the local I measures the spatial autocorrelations between -1 and 1, capturing negatives and positives spatial correlations of local values.

Other local indicators: local Geary's C and local Getis & Ord *

The local version of the Geary's C ratio is directly derived from the global version and inherits its characteristics. The * (star) indicator from Getis and Ord is more a hotspots indicator, ie., of spatial concentrations of high values, with a longer range for larger zones.

Results

Distance (km) Prop. of second homes in 2019 - local Geary's C Indicator Sources : INSEE, IGN
200 3.7 12
6.0 15

Interactive test map: variables, indicators, distance metrics

Below is a "sandbox" interactive map, to test different variables, indicators, and their parameters (weighting distance metrics, thresholds).

Calculations, algorithms and formulas

Distances matrixes

matrice_distances = Array(96) [Array(96), Array(96), Array(96)]

Global autocorrelation indicators

moran_i = ƒ(v, typepoids, seuil)

global_de_Moran = 0.1145733343841974

Valeur_attendue = -0.010526315789473684

C_global_de_Geary = 0.9712539755242631

Local autocorrelation indicators

moran_il = ƒ(v, typepoids)

Dataset, map and intermediary calculations

fond = Object {type: "Topology"}

depts = Object {type: "FeatureCollection"}

Bibliography