Socket
Socket
Sign inDemoInstall

turf-jenks

Package Overview
Dependencies
Maintainers
8
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


Version published
Weekly downloads
261
increased by8.3%
Maintainers
8
Weekly downloads
 
Created
Source

turf-jenks

build status

turf jenks module

turf.jenks(input, field, numberOfBreaks)

Given a FeatureCollection, return the Jenks Natural breaks of a given property

Parameters

parametertypedescription
inputFeatureCollectiona FeatureCollection of any type
fieldstringthe property in input on which to calculate Jenks natural breaks
numberOfBreaksnumbernumber of classes in which to group the data

Example

var points = turf.featurecollection([
  turf.point([49.859733, 40.400424], {population: 200}),
  turf.point([49.83879, 40.401209], {population: 600}),
  turf.point([49.817848, 40.376889], {population: 100}),
  turf.point([49.840507, 40.386043], {population: 200}),
  turf.point([49.854583, 40.37532], {population: 300})]);
var breaks = turf.jenks(points, 'population', 3);
//=breaks

Installation

Requires nodejs.

$ npm install turf-jenks

Tests

$ npm test

Keywords

FAQs

Package last updated on 06 Feb 2015

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