Socket
Socket
Sign inDemoInstall

turf-quantile

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-quantile

turf quantile module


Version published
Weekly downloads
46
Maintainers
1
Weekly downloads
 
Created
Source

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.

###Install

npm install turf-quantile

###Parameters

namedescription
ptspoints to classify
zz field
percentilespercentiles to classify

###Usage

quantile(pts, z, percentiles)

###Example

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

var z = '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 ]

Keywords

FAQs

Package last updated on 21 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc