npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

geoclassify

v0.0.4

Published

classify statistics

Downloads

1

Readme

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)