JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 181
  • Score
    100M100P100Q107719F
  • License MIT

turf quantile module

Package Exports

  • turf-quantile

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (turf-quantile) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

turf-quantile

build status

Takes a set of features, a property name, and a set of percentiles and outputs a quantile array. This can be passed as a break array to the isolines function or the isobands function.

var quantile = require('turf-quantile')
var fs = require('fs')

var propertyName = 'elevation'
var percentiles = [10,30,40,60,80,90,99]

var pts = JSON.parse(fs.readFileSync('/path/to/pts.geojson'))

var quantiles = quantile(pts, propertyName, percentiles)
    
console.log(quantiles) // [ 12, 25, 29, 52, 76, 99, 143 ]