Local Neighbor Match Test

The local neighbor match test (2020) is a method to identify significant locations by assessing the extent of overlap between k-nearest neighbors in geographical space and k-nearest neighbors in multi-attribute space. For more information, please read https://geodacenter.github.io/workbook/6c_local_multi/lab6c.html#local-neighbor-match-test

neighborMatchTest()

function neighborMatchTest(
    String map_uid,
    Number knn,
    Array val,
    String scale_method, 
    String distance_method,
    Number power, 
    Boolean is_inverse,
    Boolean is_arc,
    Boolean is_mile)

Arguments

Name

Type

Description

map_uid

String

the unique map id

k

Number

k nearest neighbor for both attribute and geographical space

vals

Array

an array of numeric columns that contains the values for neighbor match test

scale_method

String

the scaling method. Options are {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Default: 'standardize'

distance_method

String

the distance method. Options are {'euclidean', 'manhattan'. Default: 'euclidean'.

power

Number

the power/exponent corresponds to the number of times the base (dist_band) is used as a factor. Default: 1.

is_inverse

Boolean

if apply inverse on distance value. Default: False.

is_arc

Boolean

if compute arc distance between two observations. Default: FALSE.

is_mile

Boolean

if convert distance unit from mile to kilometer(KM). Default: TRUE.

Return

Type

Description

Object

An object with two keys: {'cardinality', 'probability'}

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

Last updated