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

geoclassify

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geoclassify

classify statistics

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source
classify

Classification 常用分级方法总结:
  • EqInterval (相等间隔)

    相等间隔最适用于常见的数据范围,将数值范围的范围划分为若干个大小相等的子范围。

  • StdDeviation (标准差)

    显示每个数值与平均值之间的差异。使用与标准差成比例的等值范围创建分类间隔

  • ArithmeticProgression(等差)

    等差分割

  • GeometricProgression(等比)

    等比分割

  • Quantile(分位法,不推荐)

    每个类都含有相等数量的要素。分位数分类非常适用于呈线性分布的数据。由于使用分位数分类将要素以同等数量分组到每个类中,因此得到的地图往往具有误导性。

  • Jenks(自然分割,推荐)

    将对分类间隔加以识别,可对相似值进行最恰当地分组,并可使各个类之间的差异最大化。

  • UniqueValues(唯一值)

如何使用
const Classify = require('geoclassify')

// 1. 初始化分级的种类 和 级别数
let classify = new Classify({
  type: 'Jenks', // EqInterval StdDeviation Arithmetic Geometric Quantile Jenks UniqueValues
  level: 5
});

// 2. 添加需要分级的数据
classify.setData(data); 

// 3. 添加pattern。样式、颜色、线宽等从小到大(从浅到深)的数组
classify.setPattern(['h', 'hh', 'hhh', 'hhhh', 'hhhhh'])

// 4. 输入具体值,返回相应的pattern
let pattern = classify.getPattern(value)

Keywords

FAQs

Package last updated on 03 Jul 2019

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