# @dkatz23238/timeseries.ts

> # Install from npm

Latest version **1.0.13** (published 2022-01-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @dkatz23238/timeseries.ts
pnpm add @dkatz23238/timeseries.ts
yarn add @dkatz23238/timeseries.ts
bun add @dkatz23238/timeseries.ts
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2022-01-18 |
| First published | 2022-01-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dkatz23238 |

## Links

- npm: https://www.npmjs.com/package/@dkatz23238/timeseries.ts
- npm.io page: https://npm.io/package/@dkatz23238/timeseries.ts

## Recent versions

- 1.0.13 (latest) — 2022-01-18
- 1.0.12 — 2022-01-16
- 1.0.11 — 2022-01-16
- 1.0.10 — 2022-01-16
- 1.0.9 — 2022-01-16
- 1.0.8 — 2022-01-15
- 1.0.7 — 2022-01-15
- 1.0.6 — 2022-01-15
- 1.0.5 — 2022-01-15
- 1.0.4 — 2022-01-15
- 1.0.3 — 2022-01-15
- 1.0.2 — 2022-01-15
- 1.0.1 — 2022-01-14
- 1.0.0 — 2022-01-14

## README

# `timeseries.ts` - A simple time series lib

# Install from npm

```sh
npm install @dkatz23238/timeseries.ts
```

# Build from source

```sh
npm run tsc
```


# Usage

```js
let d = new DateRange(["2020-01-01T00:00:00", "2020-02-01T00:00:00", "2020-03-01T00:00:00"])
let v = new Vector([10, 20, 10])

let ts = new TimeSeries(d, v)

let ts0 = TimeSeries.zeros(d)

v.push(2)
d.push("2020-04-01T00:00:00")

console.log(ts)
console.log(ts0)

console.log(v)
console.log(d)

let x = v.pop()
let s = d.pop()


console.log(v)
console.log(d)

ts.setIndexByPos("2024-01-02T00:00:00", 0);

// Setting value by
ts.setValueByIndex("2020-02-01T00:00:00", 23);

console.log(ts)
```

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