turf-deviation
turf deviation module
turf.deviation(polygons, points, inField, outField)
Calculates the standard deviation value of a field for points within a set of polygons.
Parameters
parameter | type | description |
---|---|---|
polygons |
FeatureCollection | a FeatureCollection of Polygon features |
points |
FeatureCollection | a FeatureCollection of Point features |
inField |
String | the field in points from which to aggregate |
outField |
String | the field to append to polygons representing deviation |
Example
var polygons = turf;var points = turf; var inField = 'population';var outField = 'pop_deviation'; var deviated = turf; var result = turf; //=result
Installation
Requires nodejs.
$ npm install turf-deviation
Tests
$ npm test