Local Moran

Local indicators of spatial association or LISA is a class of local statistics that measure spatial association in sub-regions of the study region. They are often used to identify spatial outliers and local clusters.

The Local Moran statistic was suggested in Anselin (1995) as a way to identify local clusters and local spatial outliers. For more details, please read http://geodacenter.github.io/workbook/6a_local_auto/lab6a.html

localMoran()

function localMoran(
    WeightResult w,
    Array val,
    Number permutations, 
    String permutation_method,
    NUmber significance_cutoff, 
    Number seed)

Arguments

Name

Type

Description

w

WeightResult

the WeightResult object created from weights function

val

Array

the values of a selected variable

permutations

Number

the number of permutations for the LISA computation. Default: 999.

permutation_method

String

the permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.

significance_cutoff

Number

the cutoff value for significance p-values to filter not-significant clusters. Default: 0.05.

seed

Number

the seed for random number generator used in LISA statistics. Default: 123456789.

Return

Type

Description

LisaResult

The LisaResult object contains the results of LISA computation: pvalues, clusters, lisa_values, neighbors, labels, colors

Examples

const jsgeoda = require('jsgeoda');
const fs = require('fs');

// load data
const data = fs.readFileSync('./data/natregimes.geojson').buffer;

// create jsgeoda instance
const geoda = await jsgeoda.New();

// load geojson in jsgeoda
const nat = geoda.readGeoJSON(data);

// create a queen contiguity weights
const w = geoda.getQueenWeights(nat);

// get HR60 values
const hr60 = geoda.getColumn(nat, "HR60");

// local moran statistics 
const lm = geoda.localMoran(w, hr60);

Try it yourself in the playground (jsgeoda + deck.gl):

Last updated