# time-series

> A simple library for doing time-series analysis in Node.js.

Latest version **0.0.1** (published 2013-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install time-series
pnpm add time-series
yarn add time-series
bun add time-series
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2013-05-26 |
| First published | 2013-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Rob Britton |
| Maintainers | robbrit |
| Keywords | statistics, time series |

## Links

- npm: https://www.npmjs.com/package/time-series
- Repository: https://github.com/robbrit/node-time-series
- npm.io page: https://npm.io/package/time-series

## Dependencies (3)

- [underscore](https://npm.io/package/underscore.md) *
- [coffee-script](https://npm.io/package/coffee-script.md) 1.4.0
- [simple-statistics](https://npm.io/package/simple-statistics.md) 0.3.0

## Recent versions

- 0.0.1 (latest) — 2013-05-26

## README

Wat
===

Simple library for doing time series analysis in Node.js. Much of the
functionality has been closed from the time series module in Ruby's
statsample library: https://github.com/clbustos/statsample

Install
=======

Easy:

    npm install time-series

Usage
=====
        
Simple statistics:

    ts = new TimeSeries([1, 2, 3, 4]);

    ts.mean();  // => gives 2.5
    ts.sd();    // => gives around 1.291
    ts.var();   // => gives around 1.667

Moving averages:

    ts = new TimeSeries(_.range(30));

    // Default MA length is 10, gives 9 null observations at the start
    ts.ma();   // => [null, ..., null, 4.5, 5.5, 6.5, ..., 23.5, 24.5]

    // Different MA length
    ts.ma(5);  // => [null, ..., null, 2, 3, 4, 5, ...]

Exponential moving averages:

    ts = new TimeSeries(_.range(30));

    ts.ema();  // => [null, ..., null, 5.5, 6.5, 7.5, ...]
    ts.ema(5); // => [null, ..., null, 3, 4, 5, 6, ...]

Licence
=======

MIT

---
_Source: https://npm.io/package/time-series · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
