1.2.4 • Published 6 years ago

percentile-freq-calculator v1.2.4

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Percentile-Freq-Calculator

This package calculates percentiles given a frequency distribution. Other npm percentile packages assume you have raw unaggregated data points.

npm link

Usage

Takes in data, an array of objects with "myValue" as the name of the key of the primary data and "freq" as the name of the key of the frequency data.

const percentile_freq_calculator = require('percentile-freq-calculator');


const data = [{myValue:1, freq: 1},{myValue:2, freq: 3},{myValue:3, freq: 6}]

percentile_freq_calculator(data, 0.5, "myValue", "freq") // returns the median
=> 3

percentile_freq_calculator(data, 0.1, "myValue", "freq") // returns the 10th percentile
=> 1
1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago