Crate classify

Source

Structs§

Bin
Represents a single bin in a classification, including the bin’s lowest (inclusive) and highest (exclusive) values and the number of points within it

Functions§

breaks_to_classification
Returns a Classification object given a set of breaks between bins and the original dataset
classify_val
Returns an Option containing the index of the Bin within which a value should fall given the value and a Classification (returns None if the value is outside of the Classification’s range)
get_equal_interval_breaks
Returns a vector of breaks generated through the Equal Interval Breaks algorithm given the desired number of bins and a dataset
get_equal_interval_classification
Returns a Classification object following the Equal Interval Breaks algorithm given the desired number of bins and one-dimensional data
get_head_tail_breaks
Returns a vector of breaks generated through the Head-Tail Breaks algorithm given a dataset
get_head_tail_classification
Returns a Classification object following the Head-Tail Breaks algorithm given one-dimensional data
get_hinge_breaks
Returns a vector of breaks generated through the Hinge Breaks algorithm given the desired number of bins and a dataset
get_hinge_classification
Returns a Classification object following the Hinge Breaks algorithm given the desired number of bins and one-dimensional data
get_jenks_breaks
Returns a vector of breaks generated through the Jenks Natural Breaks algorithm given the desired number of bins and a dataset
get_jenks_classification
Returns a Classification object following the Jenks Natural Breaks algorithm given the desired number of bins and one-dimensional data
get_quantile_breaks
Returns a vector of breaks generated through the Quantile Breaks algorithm given the desired number of bins and a dataset
get_quantile_classification
Returns a Classification object following the Quantile Breaks algorithm given the desired number of bins and one-dimensional data
get_st_dev_breaks
Returns a vector of breaks generated through the Standard Deviation Breaks algorithm given the desired bin size as a proportion of a standard deviation and a dataset Note: This algorithm calculates Standard Deviation with Bessel’s correction
get_st_dev_classification
Returns a Classification object following the Standard Deviation Breaks algorithm given the desired bin size as a proportion of a standard deviation and one-dimensional data Note: This algorithm calculates Standard Deviation with Bessel’s correction

Type Aliases§

Classification
Represents a full classification, which is a collection of Bin objects