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 |
|
Contains functions for bootstrapping one or many time series. |
|
|
A sequence of data observed at time points. |
|
|
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
|
Full Usage:
TimeSeries.bound startDate endDate series
Parameters:
'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).
|
Full Usage:
TimeSeries.commonTimeline series
Parameters:
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.
|
|
The times at which observations that form the time-series were made.
|
|
The date of the last observation within a time series.
|
|
The time intervals - or epochs - that form the time series, where the baseline time is that defined in the time-series.
|
Full Usage:
TimeSeries.findExact time series
Parameters:
'a
series : TimeSeries<'b, 'a, 'c, 'd>
Returns: 'b * 'a
|
Find an observation by its exact time of occurrence.
|
Full Usage:
TimeSeries.fromCalibratedRadiocarbonObservations dataset
Parameters:
Observation<'a, RadiocarbonCal> seq
Returns: TimeSeries<'a, RadiocarbonCal, float<MeasureProduct<cal yr BP, MeasureOne>>, float<MeasureProduct<cal yr BP, MeasureOne>>>
|
|
Full Usage:
TimeSeries.fromNeoObservations dataset
Parameters:
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.
|
Full Usage:
TimeSeries.fromObservations dateType dataset
Parameters:
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.
|
Full Usage:
TimeSeries.fromRadiocarbonObservations dataset
Parameters:
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.
|
Create a time-series where time is represented by uncalibrated radiocarbon dates (BP dates).
|
Full Usage:
TimeSeries.fromSeq timeUnitMode t1 resolution data
Parameters:
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.
|
Full Usage:
TimeSeries.generalise desiredResolution upscaleFunction series
Parameters:
FixedTemporalResolution<'a>
upscaleFunction : Observation<'T, 'date> seq -> 'T2
series : TimeSeries<'T, 'date, 'timeunit, 'timespan>
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.
|
Full Usage:
TimeSeries.head ts
Parameters:
TimeSeries<'a, 'b, 'c, 'd>
Returns: Observation<'a, 'b>
|
|
Full Usage:
TimeSeries.initTimeline timeUnitMode t1 tEnd resolution
Parameters:
DateMode<'date, 'timeunit, 'timespan>
t1 : 'date
tEnd : 'date
resolution : FixedTemporalResolution<'timespan>
Returns: 'date seq
|
Make a timeline based on a resolution and start and end dates.
|
Full Usage:
TimeSeries.interpolateFloats resolution series
Parameters:
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>
|
Interpolates missing values in a time series, where missing values are represented as an `Option` type.
|
Full Usage:
TimeSeries.map f series
Parameters:
'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.
|
Full Usage:
TimeSeries.resolution series
Parameters:
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.
|
Full Usage:
TimeSeries.tail series
Parameters:
TimeSeries<'a, 'b, 'c, 'd>
Returns: TimeSeries<'a, 'b, 'c, 'd>
|
|
Full Usage:
TimeSeries.toObservations series
Parameters:
TimeSeries<'a, 'b, 'c, 'd>
-
A time-series
Returns: ('a * 'b) seq
|
Turn a time series into a sequence of observations
|
Full Usage:
TimeSeries.trimEnd endDate series
Parameters:
'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.
|
Full Usage:
TimeSeries.trimStart startDate series
Parameters:
'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.
|
bristlecone