Skip to content
/ Jenks Public

Jenks Natural Breaks自然断点法TypeScript实现

Notifications You must be signed in to change notification settings

42arch/Jenks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

npm install jenks

or

yarn add jenks

Usage

  // commonjs
  const Jenks = require('jenks').Jenks
  // or es moudule
  // import { Jenks } from "jenks"


  let data = [1, 2, 5, 15, 45, 89.3, 112, 31 ,120, 0.5]
  let n_classes = 3
  let result = new Jenks(data, n_classes).naturalBreak()
  console.log(result)
  // [ 0.5, 15, 45, 120 ]

About

Jenks Natural Breaks自然断点法TypeScript实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published