If you are looking for general time series functionality, check out the much more mature TimeSeries.jl package first.
The package supports, value
of arbitrary type and any timestamp
which can be sorted.
The key data types are the Event
, which wraps a (timestamp, value) pair;
the Segment
which wraps a (time start, time end, value) triplet;
the EventSeries
(subtype of AbstracVector
), which holds the time series.
The EventSeries
has, in addition to the standard AbstracVector
interface, the following methods:
align(::EventSeries...)
returns a tuple ofEventSeries
containing subsets of the corresponding series input, such that the time domain of each output series corresponds to the largest common time domain of the input series. (Seeselect
below.)cumtime(::EventSeries, value)
returns the cumulative time for which the series takes the inputvalue
.fill_forward_event(::EventSeries, time)
returns the most recentEvent
prior to inputtime
.fill_forward_value(::EventSeries, time)
returns the most recentvalue
prior to inputtime
.fuse(;named_eventseries)
returns a new a newEventSeries
with time sortedEvent
s for each timestamp in the input series, where the values are named tuples containing the fill forward value of all input time series.segments(events)
returns an iterator over allSegement
s defined by consecutiveEvent
s in the input.select(::EventSeries, tstart, tend)
returns anEventSeries
which is a subset of the input series, containing theEvents
in the time domain[tstart, tend]
. The endpoint values are set by filling forward.splice(;named_eventseries...)
returns a new a newEventSeries
with time sortedEvent
s for each timestamp in the input series, where the values are values are name-value pairs.