Skip to content

TemporalData

Builds temporal data from a list of values and a list of time stamps.

A single path pairs each value with its time stamp:

$ wo 'TemporalData[{2, 1, 6, 5, 7, 4}, {{1, 2, 5, 10, 12, 15}}]["Path"]'
{{1, 2}, {2, 1}, {5, 6}, {10, 5}, {12, 7}, {15, 4}}

Descriptive statistics operate on the value path:

$ wo 'Mean[TemporalData[{2, 1, 6, 5, 7, 4}, {{1, 2, 5, 10, 12, 15}}]]'
25/6

ListLinePlot draws the path against its time axis:

$ wo 'ListLinePlot[TemporalData[{2, 1, 6, 5, 7, 4}, {{1, 2, 5, 10, 12, 15}}]]'
-Graphics-

Several value paths sharing one time axis stay a multi-path TemporalData, and ListLinePlot draws one line per path:

$ wo 'Head[TemporalData[{{2, 1, 6, 5, 7, 4}, {4, 7, 5, 6, 1, 2}}, {{1, 2, 5, 10, 12, 15}}]]'
TemporalData
$ wo 'ListLinePlot[TemporalData[{{2, 1, 6, 5, 7, 4}, {4, 7, 5, 6, 1, 2}}, {{1, 2, 5, 10, 12, 15}}]]'
-Graphics-