TimeSeries<T> class

Utility class to hold a pair of lists, one with the score values and one with the timestamps @property timestamps timestamps relative to the score, are always normalized to the CURRENT local time zone of the device

Available extensions
Annotations
  • @JsonSerializable.new()

Constructors

TimeSeries({required List<T> values, required List<ZonedDateTime> timestamps, required List<T> confidenceIntervalLow, required List<T> confidenceIntervalHigh, required List<double> confidence})
Constructor
TimeSeries.empty()
Empty constructor
factory
TimeSeries.fromJson(Map<String, dynamic> json)
Create a TimeSeries object from a json
factory

Properties

confidence → List<double>
Confidence of the values
final
confidenceIntervalHigh → List<T>
Upper bound of the confidence interval
final
confidenceIntervalLow → List<T>
Lower bound of the confidence interval
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timestamps → List<ZonedDateTime>
Timestamps relative to the values, are always normalized to the CURRENT local time zone of the device
final
values → List<T>
Values over time, can be a double or a more complex object
final

Methods

dropna() → TimeSeries<double>

Available on TimeSeries<double>, provided by the DoubleTimeSeiresExtension extension

Drop all nan values from the time series.
dropna() → TimeSeries<ScreenTimeAggregate>

Available on TimeSeries<ScreenTimeAggregate>, provided by the ScreenTimeAggregateTimeSeiresExtension extension

Drop all nan values from the time series.
dropna() → TimeSeries<SleepSummary>

Available on TimeSeries<SleepSummary>, provided by the SleepSummaryTimeSeiresExtension extension

Drop all nan values from the time series.
dropna() → TimeSeries<TrendHolder>

Available on TimeSeries<TrendHolder>, provided by the TrendHolderTimeSeiresExtension extension

Drop all nan values from the time series.
extractMonthlyAverages() → TimeSeries<ScreenTimeAggregate>

Available on TimeSeries<ScreenTimeAggregate>, provided by the ExtractScreenTimeAggregateWeeklyAverages extension

Extracts the monthly averages from the time series.
extractMonthlyAverages() → TimeSeries<SleepSummary>

Available on TimeSeries<SleepSummary>, provided by the ExtractSleepSummaryWeeklyAverages extension

Extracts the monthly averages from the time series.
extractMonthlyAverages() → TimeSeries<double>

Available on TimeSeries<double>, provided by the ExtractWeeklyAverages extension

Extracts the monthly averages from the time series.
extractWeeklyAverages() → TimeSeries<ScreenTimeAggregate>

Available on TimeSeries<ScreenTimeAggregate>, provided by the ExtractScreenTimeAggregateWeeklyAverages extension

Extracts the weekly averages from the time series.
extractWeeklyAverages() → TimeSeries<SleepSummary>

Available on TimeSeries<SleepSummary>, provided by the ExtractSleepSummaryWeeklyAverages extension

Extracts the weekly averages from the time series.
extractWeeklyAverages() → TimeSeries<double>

Available on TimeSeries<double>, provided by the ExtractWeeklyAverages extension

Extracts the weekly averages from the time series.
isEmpty() → bool

Available on TimeSeries<double>, provided by the DoubleTimeSeiresExtension extension

Check if the time series is empty (ignores nans).
isEmpty() → bool

Available on TimeSeries<ScreenTimeAggregate>, provided by the ScreenTimeAggregateTimeSeiresExtension extension

Check if the time series is empty (ignores nans).
isEmpty() → bool

Available on TimeSeries<SleepSummary>, provided by the SleepSummaryTimeSeiresExtension extension

Check if the time series is empty (ignores nans).
isEmpty() → bool

Available on TimeSeries<TrendHolder>, provided by the TrendHolderTimeSeiresExtension extension

Check if the time series is empty (ignores nans).
isNotEmpty() → bool

Available on TimeSeries<double>, provided by the DoubleTimeSeiresExtension extension

Check if the time series is not empty (ignores nans).
isNotEmpty() → bool

Available on TimeSeries<ScreenTimeAggregate>, provided by the ScreenTimeAggregateTimeSeiresExtension extension

Check if the time series is not empty (ignores nans).
isNotEmpty() → bool

Available on TimeSeries<SleepSummary>, provided by the SleepSummaryTimeSeiresExtension extension

Check if the time series is not empty (ignores nans).
isNotEmpty() → bool

Available on TimeSeries<TrendHolder>, provided by the TrendHolderTimeSeiresExtension extension

Check if the time series is not empty (ignores nans).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reverse() → TimeSeries<T>

Available on TimeSeries<T>, provided by the TimeSeriesExtension extension

Reverses the time series in time.
takeLast(int n) → TimeSeries<T>

Available on TimeSeries<T>, provided by the TimeSeriesExtension extension

Returns the last n elements of the time series.
toJson() → Map<String, dynamic>
Convert the TimeSeries object to a json
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

dumbTZMapper(String tz) → String
A naive timezone mapper