Header menu logo bristlecone

TimeSeries Module

Types

Type Description

FloatingTimeSeries<'T>

A sequence of data observed at time points.

TimeSeries<'T>

A sequence of data observed at time intervals (regular or irregular), where the sampling intervals occur following a fixed start observation.

Functions and values

Function or value Description

TimeSeries.bootstrapFixedStep stepping i series

Full Usage: TimeSeries.bootstrapFixedStep stepping i series

Parameters:
Returns: TimeSeries<'a>

Removing a step takes account of leap years. NB Never removes the original start point.

stepping : TimeSpan
i : int
series : TimeSeries<'a>
Returns: TimeSeries<'a>

TimeSeries.bound startDate endDate series

Full Usage: TimeSeries.bound startDate endDate series

Parameters:
Returns: TimeSeries<'a> option

Bound a time series inclusively

startDate : DateTime
endDate : DateTime
series : TimeSeries<'a>
Returns: TimeSeries<'a> option

TimeSeries.checkMoreThanEqualTo n seq

Full Usage: TimeSeries.checkMoreThanEqualTo n seq

Parameters:
    n : int
    seq : 'a

Returns: 'a option
n : int
seq : 'a
Returns: 'a option

TimeSeries.commonTimeline series

Full Usage: TimeSeries.commonTimeline series

Parameters:
Returns: TimeSpan[] option
**Description**
 Determines if multiple time series have the same temporal extent and time steps.
**Output Type**
  * A `TimeSpan [] option` containing the common timeline, or `None` if there is no common timeline.
series : TimeSeries<'a> list
Returns: TimeSpan[] option

TimeSeries.dates series

Full Usage: TimeSeries.dates series

Parameters:
Returns: DateTime seq

Time points of sampling within the time series.

series : TimeSeries<'a>
Returns: DateTime seq

TimeSeries.endDate series

Full Usage: TimeSeries.endDate series

Parameters:
Returns: DateTime

Date of the last observation within the time series.

series : TimeSeries<'a>
Returns: DateTime

TimeSeries.epochs series

Full Usage: TimeSeries.epochs series

Parameters:
Returns: TimeSpan[]

The time intervals - or *epochs* - that form the time series.

series : TimeSeries<'a>
Returns: TimeSpan[]

TimeSeries.findExact time series

Full Usage: TimeSeries.findExact time series

Parameters:
Returns: Observation<'a>

Find an observation by its exact time of occurrence.

time : DateTime
series : TimeSeries<'a>
Returns: Observation<'a>

TimeSeries.fromObservations dataset

Full Usage: TimeSeries.fromObservations dataset

Parameters:
Returns: TimeSeries<'a>

Arrange existing observations as a bristlecone `TimeSeries`. Observations become ordered and indexed by time.

dataset : Observation<'a> seq
Returns: TimeSeries<'a>

TimeSeries.fromSeq t1 resolution data

Full Usage: TimeSeries.fromSeq t1 resolution data

Parameters:
Returns: TimeSeries<'a>

Create a time series from a sequence of existing data, where each observation is equally spaced in time.

t1 : DateTime
resolution : FixedTemporalResolution
data : 'a seq
Returns: TimeSeries<'a>

TimeSeries.generalise desiredResolution upscaleFunction series

Full Usage: TimeSeries.generalise desiredResolution upscaleFunction series

Parameters:
Returns: TimeSeries<'a>

Reduces the temporal resolution of `series`. The time series must be able to be split exactly into the lower resolution. For example, when upscaling from one to three years, the time series must be a multiple of three years.

desiredResolution : FixedTemporalResolution
upscaleFunction : Observation<'a> seq -> 'a
series : TimeSeries<'a>
Returns: TimeSeries<'a>

TimeSeries.interpolate series

Full Usage: TimeSeries.interpolate series

Parameters:
Returns: TimeSeries<float>

Interpolates missing values in a time series, where missing values are represented as an `Option` type.

series : TimeSeries<float option>
Returns: TimeSeries<float>

TimeSeries.map f series

Full Usage: TimeSeries.map f series

Parameters:
Returns: TimeSeries<'b>

Map a function to each value in the time series.

f : 'a * TimeSpan -> 'b
series : TimeSeries<'a>
Returns: TimeSeries<'b>

TimeSeries.resolution series

Full Usage: TimeSeries.resolution series

Parameters:
Returns: TemporalResolution

Calculates the temporal resolution of a time series

series : TimeSeries<'a>
Returns: TemporalResolution

TimeSeries.toObservations series

Full Usage: TimeSeries.toObservations series

Parameters:
Returns: Observation<'a> seq

Turn a time series into a sequence of observations

series : TimeSeries<'a>
Returns: Observation<'a> seq

TimeSeries.trimEnd endDate series

Full Usage: TimeSeries.trimEnd endDate series

Parameters:
Returns: TimeSeries<'a> option

Remove all time points that occur after the desired end date.

endDate : DateTime
series : TimeSeries<'a>
Returns: TimeSeries<'a> option

TimeSeries.trimStart startDate series

Full Usage: TimeSeries.trimStart startDate series

Parameters:
Returns: TimeSeries<'a> option

Remove all time points that occur before the desired start date.

startDate : DateTime
series : TimeSeries<'a>
Returns: TimeSeries<'a> option

Type something to start searching.