Skip to content

Instantly share code, notes, and snippets.

@stri8ed
stri8ed / jenks.js
Last active July 6, 2022 01:33 — forked from tmcw/README.md
function jenks(data, n_classes) {
if (n_classes > data.length) return null;
data = data.slice().sort(function (a, b) {
return a - b;
});
var matrices = getMatrices(data, n_classes);
var lower_class_limits = matrices.lower_class_limits;