mapclassify.PrettyBreaks

class mapclassify.PrettyBreaks(y, k=5)[source]
__init__(y, k=5)[source]

Pretty breakpoints

Computes breaks that are equally spaced round values which cover the range of values in y. The breaks are chosen so that they are 1, 2, or 5 times a power of 10.

Parameters:
yarray (n,1)

attribute to classify

kint

The number of desired classes

Notes

The number of classes may be different from the specified k, as the rounding of the upper bounds takes precedent.

The lower bound of the first interval will be equal to the minimum of the data.

Methods

__init__(y[, k])

Pretty breakpoints

find_bin(x)

Sort input or inputs according to the current bin estimate.

get_adcm()

Absolute deviation around class median (ADCM).

get_fmt()

get_gadf()

Goodness of absolute deviation of fit.

get_legend_classes([fmt])

Format the strings for the classes on the legend.

get_tss()

Returns sum of squares over all class means.

make(*args, **kwargs)

Configure and create a classifier that will consume data and produce classifications, given the configuration options specified by this function.

plot(gdf[, border_color, border_width, ...])

Plot a mapclassifier object.

plot_histogram([color, linecolor, ...])

Plot histogram of y with bin values superimposed

set_fmt(fmt)

table()

update([y, inplace])

Add data or change classification parameters.

Attributes

fmt