An open API service indexing awesome lists of open source software.

https://github.com/msn0/stats-median

Calculate median of a given data
https://github.com/msn0/stats-median

median statistics

Last synced: 8 months ago
JSON representation

Calculate median of a given data

Awesome Lists containing this project

README

          

# Median [![Build Status](https://travis-ci.org/msn0/stats-median.svg?branch=master)](http://travis-ci.org/msn0/stats-median)

> Calculate median of data.

## Installation

```sh
$ npm install stats-median
```

## Usage

```js
var median = require('stats-median');

var data = [3, 6, 7, 8, 8, 10, 13, 15, 16, 20];

median.calc(data); // → 9
```

### API

#### calc(data)

##### data

Type: `array`

The data to be analysed; an array of numbers.

## License
MIT © [Michał Jezierski](https://pl.linkedin.com/in/jezierskimichal)