1.12.0 • Published 10 months ago
@apio/timeframes v1.12.0
Quickstart
Install through NPM
npm i @apio/timeframes
There are a few examples that you can check out in the examples directory.
TimeSeries
import { TimeSerie } from '@apio/timeframes'
// Pass an array of points
// a point is a tuple [DateLike, PointValue]
// DateLike is value that can be passed to new Date()
// PointValue is any value, but preferably a number (to compute sums averages ecc)
const ts = new TimeSerie([["2022-01-01", 12],["2022-01-02", 13]])
const sum = ts.sum()
const avg = ts.avg()
TimeFrames
import { TimeFrame } from '@apio/timeframes'
// Each item is a row
const rows = [
{time: "2022-01-01", value1:10, value2:140},
{time: "2022-01-02", value1:41}, // here value2 is null
{time: "2022-01-03", value1:78, value2:301},
]
const ts = new TimeFrame(rows)
// column() extracts columns as timeseries
const total1 = ts.column("value1").sum()
1.11.4
10 months ago
1.11.2
11 months ago
1.12.0
10 months ago
1.11.0
11 months ago
1.10.0
1 year ago
1.9.2
1 year ago
1.9.0
1 year ago
1.8.0
1 year ago
1.2.0
2 years ago
1.1.0
2 years ago
1.2.6
2 years ago
1.7.0
2 years ago
1.2.4
2 years ago
1.5.0
2 years ago
1.2.2
2 years ago
1.3.0
2 years ago
1.1.2
2 years ago
0.2.7
2 years ago
0.2.9
2 years ago
0.2.5
2 years ago
0.2.3
2 years ago
0.1.37
2 years ago
0.2.1
2 years ago
0.1.31
3 years ago
0.1.21
3 years ago
0.1.33
3 years ago
0.1.11
3 years ago
0.1.23
3 years ago
0.1.35
3 years ago
0.1.13
3 years ago
0.1.25
3 years ago
0.1.1
3 years ago
0.1.27
3 years ago
0.1.17
3 years ago
0.1.7
3 years ago
0.1.29
3 years ago
0.1.19
3 years ago
0.1.9
3 years ago
0.1.3
3 years ago
0.0.1
3 years ago