cumbin
v0.2.1
Published
Cumulative binning transform for JavaScript.
Downloads
45
Maintainers
Readme
cumbin
Dependency-free browser ESM cumulative binning for JavaScript and Observable notebooks.
import { cumbin } from "cumbin";In Observable:
import { cumbin, summarizeBins } from "npm:cumbin"Or, with a direct UNPKG dynamic import:
cumbin = (await import("https://unpkg.com/[email protected]/cumbin.js?module")).defaultindex.js is also included as a compatibility alias.
rows = cumbin(
[
{ label: "A", value: 12 },
{ label: "B", value: 3 },
{ label: "C", value: 17 }
],
{ value: "value", binSize: 10 }
)The module exports cumbin, cumulativeBins, summarizeBins, and normalizeSpec.
