@turf/moran-index
Measures patterns of attribute values associated with features. Reveals whether similar values tend to occur near each other, or whether high or low values are interspersed
Last updated 4 months ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @turf/moran-index 
SYNC missed versions from official npm registry.

@turf/moran-index

MoranIndex

Type: object

Properties

  • moranIndex number the moran's Index of the observed feature set
  • expectedMoranIndex number the moran's Index of the random distribution
  • stdNorm number the standard devitaion of the random distribution
  • zNorm number the z-score of the observe samples with regard to the random distribution

moranIndex

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*

  1. Moran's I

  2. pysal

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

Parameters

  • fc FeatureCollection<any>

  • options Object

    • options.inputField string the property name, must contain numeric values
    • options.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)

Examples

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.

Installation

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

Current Tags

  • 7.4.0                                ...           latest (4 months ago)
  • 7.1.0-alpha.70                                ...           prerelease (2 years ago)

30 Versions

  • 7.4.0                                ...           4 months ago
  • 7.3.5                                ...           7 months ago
  • 7.3.4                                ...           10 months ago
  • 7.3.3                                ...           10 months ago
  • 7.3.2                                ...           10 months ago
  • 7.3.1                                ...           a year ago
  • 7.3.0                                ...           a year ago
  • 7.2.0                                ...           2 years ago
  • 7.1.0                                ...           2 years ago
  • 7.1.0-alpha.70                                ...           2 years ago
  • 7.1.0-alpha.7                                ...           2 years ago
  • 7.0.0                                ...           2 years ago
  • 7.0.0-alpha.116                                ...           3 years ago
  • 7.0.0-alpha.115                                ...           3 years ago
  • 7.0.0-alpha.114                                ...           3 years ago
  • 7.0.0-alpha.113                                ...           3 years ago
  • 7.0.0-alpha.111                                ...           3 years ago
  • 7.0.0-alpha.110                                ...           3 years ago
  • 7.0.0-alpha.2                                ...           3 years ago
  • 7.0.0-alpha.1                                ...           3 years ago
  • 7.0.0-alpha.0                                ...           4 years ago
  • 6.5.0                                ...           5 years ago
  • 6.4.0                                ...           5 years ago
  • 6.3.0                                ...           6 years ago
  • 6.2.0                                ...           6 years ago
  • 6.2.0-alpha.3                                ...           6 years ago
  • 6.2.0-alpha.2                                ...           6 years ago
  • 6.2.0-alpha.1                                ...           7 years ago
  • 6.0.1                                ...           9 years ago
  • 6.0.0                                ...           9 years ago
Downloads
Total 62
Today 0
This Week 3
This Month 37
Last Day 0
Last Week 22
Last Month 23
Dependencies (5)
Dev Dependencies (9)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE