statler
Yet another statistics helper library
Usage
Histogram
; const histogram = multiple: 50 151 98 159; console;// [// [ 100, 1 ],// [ 150, 2 ]// ]
Alternatively, you can call toCSV()
(this is handy to write to file, open in Excel, and generate a graph quickly)
const histogram = multiple: 50 151 98 159; console;// bucket,count// 100,1// 150,2
You can keep adding data to an existing histogram
const histogram = multiple: 50 151;histogram; console;// [// [ 100, 1 ],// [ 150, 2 ]// ]
You can have multiple series (or categories)
const histogram = multiple: 50 cat1: 102 149 53 cat2: 98 151 159 ; console;// [// [ 50, { cat1: 1, cat2: 0 } ],// [ 100, { cat1: 1, cat2: 1 } ],// [ 150, { cat1: 1, cat2: 2 } ]// ]
Running tests
Run tests with npm test
License
MIT