|
|
il y a 4 mois | |
|---|---|---|
| .. | ||
| dist | il y a 4 mois | |
| LICENSE | il y a 4 mois | |
| README.md | il y a 4 mois | |
| package.json | il y a 4 mois | |
Type: object
moranIndex number the moran's Index of the observed feature setexpectedMoranIndex number the moran's Index of the random distributionstdNorm number the standard devitaion of the random distributionzNorm number the z-score of the observe samples with regard to the random distributionMoran'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 Object
options.inputField string the property name, must contain numeric valuesoptions.threshold number the distance threshold (optional, default 100000)options.p number the Minkowski p-norm distance parameter (optional, default 2)options.binary boolean whether transfrom the distance to binary (optional, default false)options.alpha number the distance decay parameter (optional, default -1)options.standardization boolean wheter row standardization the distance (optional, default true)const bbox = [-65, 40, -63, 42];
const dataset = turf.randomPoint(100, { bbox: bbox });
const result = turf.moranIndex(dataset, {
inputField: 'CRIME',
});
Returns MoranIndex
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this single module individually:
$ npm install @turf/moran-index
Or install the all-encompassing @turf/turf module that includes all modules as functions:
$ npm install @turf/turf