Header menu logo bristlecone

TimeSeries Module

Contains functions and types to create and manipulate
 `TimeSeries` values, which represent observations ordered in time.

Types and nested modules

Type/Module Description

Bootstrap

Contains functions for bootstrapping one or many time series.

FloatingTimeSeries<'T, 'timespan>

A sequence of data observed at time points.

TimeSeries<'T, 'date, 'timeunit, 'timespan>

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.bound startDate endDate series

Full Usage: TimeSeries.bound startDate endDate series

Parameters:
    startDate : 'a - A start date to clip from
    endDate : 'a - An end date to clip beyond
    series : TimeSeries<'b, 'a, 'c, 'd> - A time-series

Returns: TimeSeries<'b, 'a, 'c, 'd> option

Bound a time series inclusively of the specified start and end date (if either are present, they will be included in the new time series).

startDate : 'a

A start date to clip from

endDate : 'a

An end date to clip beyond

series : TimeSeries<'b, 'a, 'c, 'd>

A time-series

Returns: TimeSeries<'b, 'a, 'c, 'd> option

TimeSeries.commonTimeline series

Full Usage: TimeSeries.commonTimeline series

Parameters:
    series : TimeSeries<'T, 'date, 'timeunit, 'timespan> seq - A sequence of time-series to assess for commonality

Returns: 'date[] option An array of 'timespan containing the epochs of the common timeline, or `None` if there is no common timeline.

Determines if multiple time series have the same temporal extent and time steps.

series : TimeSeries<'T, 'date, 'timeunit, 'timespan> seq

A sequence of time-series to assess for commonality

Returns: 'date[] option

An array of 'timespan containing the epochs of the common timeline, or `None` if there is no common timeline.

TimeSeries.dates series

Full Usage: TimeSeries.dates series

Parameters:
Returns: 'b seq

The times at which observations that form the time-series were made.

series : TimeSeries<'a, 'b, 'c, 'd>
Returns: 'b seq

TimeSeries.endDate series

Full Usage: TimeSeries.endDate series

Parameters:
Returns: 'b

The date of the last observation within a time series.

series : TimeSeries<'a, 'b, 'c, 'd>
Returns: 'b

TimeSeries.epochs series

Full Usage: TimeSeries.epochs series

Parameters:
Returns: 'd[]
The time intervals - or epochs - that form the time series, where the baseline
 time is that defined in the time-series.
series : TimeSeries<'a, 'b, 'c, 'd>
Returns: 'd[]

TimeSeries.findExact time series

Full Usage: TimeSeries.findExact time series

Parameters:
Returns: 'b * 'a

Find an observation by its exact time of occurrence.

time : 'a
series : TimeSeries<'b, 'a, 'c, 'd>
Returns: 'b * 'a

TimeSeries.fromCalibratedRadiocarbonObservations dataset

Full Usage: TimeSeries.fromCalibratedRadiocarbonObservations dataset

Parameters:
Returns: TimeSeries<'a, RadiocarbonCal, float<MeasureProduct<cal yr BP, MeasureOne>>, float<MeasureProduct<cal yr BP, MeasureOne>>>

TimeSeries.fromNeoObservations dataset

Full Usage: TimeSeries.fromNeoObservations dataset

Parameters:
    dataset : Observation<'a, DateTime> seq - A sequence of observations, which consist of data and dates / times

Returns: TimeSeries<'a, DateTime, int<MeasureProduct<year, MeasureOne>>, TimeSpan> A time-series of DateTime observations ordered oldest to newest.

Create a time-series where time is represented by standard (modern) calendars and dates and times through the built-in .NET DateTime type.

dataset : Observation<'a, DateTime> seq

A sequence of observations, which consist of data and dates / times

Returns: TimeSeries<'a, DateTime, int<MeasureProduct<year, MeasureOne>>, TimeSpan>

A time-series of DateTime observations ordered oldest to newest.

TimeSeries.fromObservations dateType dataset

Full Usage: TimeSeries.fromObservations dateType dataset

Parameters:
    dateType : DateMode<'date, 'dateUnit, 'timespan> - A `DateMode` that handles the dating mode of choosing.
    dataset : Observation<'T, 'date> seq - A sequence of observations, which consist of data and dates / times

Returns: TimeSeries<'T, 'date, 'dateUnit, 'timespan> A time-series of observations ordered in time from oldest to newest.

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

dateType : DateMode<'date, 'dateUnit, 'timespan>

A `DateMode` that handles the dating mode of choosing.

dataset : Observation<'T, 'date> seq

A sequence of observations, which consist of data and dates / times

Returns: TimeSeries<'T, 'date, 'dateUnit, 'timespan>

A time-series of observations ordered in time from oldest to newest.

TimeSeries.fromRadiocarbonObservations dataset

Full Usage: TimeSeries.fromRadiocarbonObservations dataset

Parameters:
Returns: TimeSeries<'a, RadiocarbonUncal, float<MeasureProduct<BP (radiocarbon), MeasureOne>>, float<MeasureProduct<BP (radiocarbon), MeasureOne>>> A time-series of BP date observations ordered oldest to newest.

Create a time-series where time is represented by uncalibrated radiocarbon dates (BP dates).

dataset : Observation<'a, RadiocarbonUncal> seq

A sequence of observations, which consist of data and dates / times

Returns: TimeSeries<'a, RadiocarbonUncal, float<MeasureProduct<BP (radiocarbon), MeasureOne>>, float<MeasureProduct<BP (radiocarbon), MeasureOne>>>

A time-series of BP date observations ordered oldest to newest.

TimeSeries.fromSeq timeUnitMode t1 resolution data

Full Usage: TimeSeries.fromSeq timeUnitMode t1 resolution data

Parameters:
    timeUnitMode : DateMode<'date, 'timeunit, 'timespan> - A `DateMode` that handles the dating mode of choosing.
    t1 : 'date - The time to fix to the initial observation
    resolution : FixedTemporalResolution<'timespan> - The temporal resolution of the time-series
    data : 'a seq - The underlying data points

Returns: TimeSeries<'a, 'date, 'timeunit, 'timespan>

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

timeUnitMode : DateMode<'date, 'timeunit, 'timespan>

A `DateMode` that handles the dating mode of choosing.

t1 : 'date

The time to fix to the initial observation

resolution : FixedTemporalResolution<'timespan>

The temporal resolution of the time-series

data : 'a seq

The underlying data points

Returns: TimeSeries<'a, 'date, 'timeunit, 'timespan>

TimeSeries.generalise desiredResolution upscaleFunction series

Full Usage: TimeSeries.generalise desiredResolution upscaleFunction series

Parameters:
Returns: TimeSeries<'T2, 'date, 'timeunit, 'timespan>

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<'a>
upscaleFunction : Observation<'T, 'date> seq -> 'T2
series : TimeSeries<'T, 'date, 'timeunit, 'timespan>
Returns: TimeSeries<'T2, 'date, 'timeunit, 'timespan>

TimeSeries.head ts

Full Usage: TimeSeries.head ts

Parameters:
Returns: Observation<'a, 'b>
ts : TimeSeries<'a, 'b, 'c, 'd>
Returns: Observation<'a, 'b>

TimeSeries.initTimeline timeUnitMode t1 tEnd resolution

Full Usage: TimeSeries.initTimeline timeUnitMode t1 tEnd resolution

Parameters:
Returns: 'date seq

Make a timeline based on a resolution and start and end dates.

timeUnitMode : DateMode<'date, 'timeunit, 'timespan>
t1 : 'date
tEnd : 'date
resolution : FixedTemporalResolution<'timespan>
Returns: 'date seq

TimeSeries.interpolateFloats resolution series

Full Usage: TimeSeries.interpolateFloats resolution series

Parameters:
Returns: TimeSeries<float<'u>, 'date, 'timeunit, 'timespan>

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

resolution : FixedTemporalResolution<'timespan>
series : TimeSeries<float<'u> option, 'date, 'timeunit, 'timespan>

A time-series of option values to interpolate

Returns: TimeSeries<float<'u>, 'date, 'timeunit, 'timespan>

TimeSeries.map f series

Full Usage: TimeSeries.map f series

Parameters:
    f : 'T * 'timespan -> 'T2 - A function that takes an observation and returns a transformed data value
    series : TimeSeries<'T, 'date, 'dateUnit, 'timespan> - A time-series to transform

Returns: TimeSeries<'T2, 'date, 'dateUnit, 'timespan> A new time-series in which the data values have been transformed

Apply a function to each observation in the time series.

f : 'T * 'timespan -> 'T2

A function that takes an observation and returns a transformed data value

series : TimeSeries<'T, 'date, 'dateUnit, 'timespan>

A time-series to transform

Returns: TimeSeries<'T2, 'date, 'dateUnit, 'timespan>

A new time-series in which the data values have been transformed

TimeSeries.resolution series

Full Usage: TimeSeries.resolution series

Parameters:
    series : TimeSeries<'T, 'date, 'dateUnit, 'timespan> - A time-series of observations

Returns: TemporalResolution<'timespan> A temporal resolution in days, months, years, or a custom epoch; the most precise will be returned (e.g. 2 months rather than 61 days).

Calculates the temporal resolution of a time series.

series : TimeSeries<'T, 'date, 'dateUnit, 'timespan>

A time-series of observations

Returns: TemporalResolution<'timespan>

A temporal resolution in days, months, years, or a custom epoch; the most precise will be returned (e.g. 2 months rather than 61 days).

TimeSeries.tail series

Full Usage: TimeSeries.tail series

Parameters:
Returns: TimeSeries<'a, 'b, 'c, 'd>
series : TimeSeries<'a, 'b, 'c, 'd>
Returns: TimeSeries<'a, 'b, 'c, 'd>

TimeSeries.toObservations series

Full Usage: TimeSeries.toObservations series

Parameters:
    series : TimeSeries<'a, 'b, 'c, 'd> - A time-series

Returns: ('a * 'b) seq

Turn a time series into a sequence of observations

series : TimeSeries<'a, 'b, 'c, 'd>

A time-series

Returns: ('a * 'b) seq

TimeSeries.trimEnd endDate series

Full Usage: TimeSeries.trimEnd endDate series

Parameters:
    endDate : 'a - An end date to clip beyond
    series : TimeSeries<'b, 'a, 'c, 'd> - A time-series

Returns: TimeSeries<'b, 'a, 'c, 'd> option

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

endDate : 'a

An end date to clip beyond

series : TimeSeries<'b, 'a, 'c, 'd>

A time-series

Returns: TimeSeries<'b, 'a, 'c, 'd> option

TimeSeries.trimStart startDate series

Full Usage: TimeSeries.trimStart startDate series

Parameters:
    startDate : 'a - A start date to clip from
    series : TimeSeries<'b, 'a, 'c, 'd> - A time-series

Returns: TimeSeries<'b, 'a, 'c, 'd> option A new time-series with the clipped observations removed

Remove all time points that occur before the desired start date, still including the specified start date if present.

startDate : 'a

A start date to clip from

series : TimeSeries<'b, 'a, 'c, 'd>

A time-series

Returns: TimeSeries<'b, 'a, 'c, 'd> option

A new time-series with the clipped observations removed

Type something to start searching.