Skip to main content
Version: Next

moranIndex

描述

¥Description

Moran's I measures patterns of attribute values associated with features.The method reveal whether similar values tend to occur near each other, or whether high or low values are interspersed.

Moran's I > 0 means a clusterd pattern.Moran's I < 0 means a dispersed pattern.Moran's I = 0 means a random pattern.

In order to test the significance of the result.The z score is calculated.A positive enough z-score (ex. >1.96) indicates clustering, while a negative enough z-score (ex.<-1.96) 表示分散模式。

¥In order to test the significance of the result. The z score is calculated. A positive enough z-score (ex. >1.96) indicates clustering, while a negative enough z-score (ex. <-1.96) indicates a dispersed pattern.

the z-score can be calculated based on a normal or random assumption.

参考文献*

¥Bibliography*

  1. Moran I 值

    ¥Moran's I

  2. pysal

  3. Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2:空间测量和统计。

    ¥Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.

参数

¥Parameters

名称类型描述
fcFeatureCollection<任意>
options对象
options.inputFieldstringthe property name, must contain numeric values
options.threshold?numberthe distance threshold (default 100000)
options.p?numberthe Minkowski p-norm distance parameter (default 2)
options.binary?booleanwhether transfrom the distance to binary (default false)
options.alpha?numberthe distance decay parameter (default -1)
options.standardization?booleanwheter row standardization the distance (default true)

返回

¥Returns

MoranIndex

示例

¥Examples

const bbox = [-65, 40, -63, 42];
const dataset = turf.randomPoint(100, { bbox: bbox });

const result = turf.moranIndex(dataset, {
inputField: "CRIME",
});

安装

¥Installation

$ npm install @turf/moran-index

import { moranIndex } from "@turf/moran-index";
const result = moranIndex(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.moranIndex(...);