Appearance
KBE3D / KBCore / turf / moranIndex
函数: moranIndex()
moranIndex(
fc:FeatureCollection<any>,options: {inputField:string;threshold?:number;p?:number;binary?:boolean;alpha?:number;standardization?:boolean; }):MoranIndex
Function
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) indicates a dispersed pattern.
the z-score can be calculated based on a normal or random assumption.
Bibliography*
Andy Mitchell, The ESRI Guide to GIS Analysis Volume 2: Spatial Measurements & Statistics.
参数
fc
FeatureCollection<any>
options
inputField
string
the property name, must contain numeric values
threshold?
number
the distance threshold
p?
number
the Minkowski p-norm distance parameter
binary?
boolean
whether transfrom the distance to binary
alpha?
number
the distance decay parameter
standardization?
boolean
wheter row standardization the distance
返回
MoranIndex
示例
ts
const bbox = [-65, 40, -63, 42];
const dataset = turf.randomPoint(100, { bbox: bbox });
const result = turf.moranIndex(dataset, {
inputField: 'CRIME',
});