Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

turf-jenks

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-jenks

turf jenks module

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
179
decreased by-4.28%
Maintainers
1
Weekly downloads
 
Created
Source

turf-jenks

Build Status

Takes a set of features, a property name, and the desired number of breaks and outputs an array of natural breaks. This classification can be used in the isolines function or the isobands function, or for theming.

###Install

npm install turf-jenks

###Parameters

namedescription
fcpoints to classify
zz field
numnumber of breaks

###Usage

jenks(fc, z, num)

###Example

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

var z = 'elevation'
var num = 10

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

var jenked = jenks(pts, z, num)

console.log(jenked) // [ 11, 12, 18, 25, 29, 41, 50, 55, 76, 90, 143 ]

Keywords

FAQs

Package last updated on 12 Dec 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