StridedBinning¶
- class geodesic.tesseract.components.StridedBinning(from_selection={}, from_end=False, duration=None, stride=None, count=None, offset=None, **kwargs)[source]¶
Bases:
geodesic.bases._APIObject
Create output time bins based on a from, duration, stride, offset, and count
This allows you to create a time binning with equal sized bins, but with a stride between each bin. Any data whose datetimes falls into a bin will be aggregated into that bin. Everything else is ignored in the output dataset.
- Parameters
from_selection (
BinSelection
) – from where the bins begin.from_end (bool) – use the right end of the bin if True
duration (str) – the bin size. Must be a string with a date duration (e.g. 1D, 1h, 1m, 1s)
stride (str) – the stride (step forward) between each the left edge of each bin. Must be a string with a date duration (e.g. 1D, 1h, 1m, 1s)
count (int) – how many bins to create
offset (str) – the offset from the first date to start the bins. Must be a string with a date duration (e.g. 1D, 1h, 1m, 1s)
See also
- from_selection¶
(
BinSelection
, dict) - When to start the strided binning. Selection of a time bin based on a datetime or indexDescriptor:
_TypeConstrainedDescr
- from_end¶
(bool) - use the right end of the bin if True
Descriptor:
_BoolDescr
- duration¶
(str) - the bin size, in time units for each bin
Descriptor:
_RegexDescr
- stride¶
(str) - the stride (step forward), in time units between each bin
Descriptor:
_RegexDescr
- offset¶
(str) - the offset from the first date to start the bins
Descriptor:
_RegexDescr