Timeframes
Dataframe-like API for timeseries-like data
⚠️ This is still a work in progress
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'
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'
const rows = [
{time: "2022-01-01", value1:10, value2:140},
{time: "2022-01-02", value1:41},
{time: "2022-01-03", value1:78, value2:301},
]
const ts = new TimeFrame(rows)
const total1 = ts.column("value1").sum()