#cartography #classification #jenks #binning

classify

A collection of algorithms for categorizing 1D data

9 releases

0.2.2 Aug 18, 2022
0.2.1 Aug 9, 2022
0.1.5 Aug 5, 2022

#438 in Algorithms

Download history 1/week @ 2022-11-23 1/week @ 2022-11-30 9/week @ 2022-12-07 1/week @ 2022-12-14 1/week @ 2022-12-21 10/week @ 2022-12-28 1/week @ 2023-01-04 1/week @ 2023-01-18 5/week @ 2023-01-25 6/week @ 2023-02-01 26/week @ 2023-02-08 18/week @ 2023-02-15 9/week @ 2023-02-22 18/week @ 2023-03-01

54 downloads per month

MIT license

45KB
705 lines

classify

This Rust crate aims to provide easy-to-use functions and structs that can classify data through a variety of algorithms, including Jenks Natural Breaks, Quantile Breaks, and more.

Implemented as of version 0.2.2:

  • Classification methods: Jenks, Quantile, Head-Tail, Equal Interval, Standard Deviation, Hinge
  • Structs/types: Bin and Classification (type synonym for Vec<Bin>)
  • Function to determine the bin in a Classification to which a particular data point belongs
  • Compatibility with any numeric data type (previously only f64)
  • Compatibility with any collection data type (previously only vector)
  • Changelog
  • WebAssembly (WASM) package + basic HTML file to test WASM code
  • Other miscellaneous functionality

Planned future features:

  • None

WebAssembly

To generate the WASM package, run

wasm-pack build --release -- -features js

in the root directory of this crate

Dependencies

~1.9–3MB
~60K SLoC