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<
Drop all nan values from the time series.double> , provided by the DoubleTimeSeiresExtension extension -
dropna(
) → TimeSeries< ScreenTimeAggregate> -
Available on TimeSeries<
Drop all nan values from the time series.ScreenTimeAggregate> , provided by the ScreenTimeAggregateTimeSeiresExtension extension -
dropna(
) → TimeSeries< SleepSummary> -
Available on TimeSeries<
Drop all nan values from the time series.SleepSummary> , provided by the SleepSummaryTimeSeiresExtension extension -
dropna(
) → TimeSeries< TrendHolder> -
Available on TimeSeries<
Drop all nan values from the time series.TrendHolder> , provided by the TrendHolderTimeSeiresExtension extension -
extractMonthlyAverages(
) → TimeSeries< ScreenTimeAggregate> -
Available on TimeSeries<
Extracts the monthly averages from the time series.ScreenTimeAggregate> , provided by the ExtractScreenTimeAggregateWeeklyAverages extension -
extractMonthlyAverages(
) → TimeSeries< SleepSummary> -
Available on TimeSeries<
Extracts the monthly averages from the time series.SleepSummary> , provided by the ExtractSleepSummaryWeeklyAverages extension -
extractMonthlyAverages(
) → TimeSeries< double> -
Available on TimeSeries<
Extracts the monthly averages from the time series.double> , provided by the ExtractWeeklyAverages extension -
extractWeeklyAverages(
) → TimeSeries< ScreenTimeAggregate> -
Available on TimeSeries<
Extracts the weekly averages from the time series.ScreenTimeAggregate> , provided by the ExtractScreenTimeAggregateWeeklyAverages extension -
extractWeeklyAverages(
) → TimeSeries< SleepSummary> -
Available on TimeSeries<
Extracts the weekly averages from the time series.SleepSummary> , provided by the ExtractSleepSummaryWeeklyAverages extension -
extractWeeklyAverages(
) → TimeSeries< double> -
Available on TimeSeries<
Extracts the weekly averages from the time series.double> , provided by the ExtractWeeklyAverages extension -
isEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is empty (ignores nans).double> , provided by the DoubleTimeSeiresExtension extension -
isEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is empty (ignores nans).ScreenTimeAggregate> , provided by the ScreenTimeAggregateTimeSeiresExtension extension -
isEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is empty (ignores nans).SleepSummary> , provided by the SleepSummaryTimeSeiresExtension extension -
isEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is empty (ignores nans).TrendHolder> , provided by the TrendHolderTimeSeiresExtension extension -
isNotEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is not empty (ignores nans).double> , provided by the DoubleTimeSeiresExtension extension -
isNotEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is not empty (ignores nans).ScreenTimeAggregate> , provided by the ScreenTimeAggregateTimeSeiresExtension extension -
isNotEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is not empty (ignores nans).SleepSummary> , provided by the SleepSummaryTimeSeiresExtension extension -
isNotEmpty(
) → bool -
Available on TimeSeries<
Check if the time series is not empty (ignores nans).TrendHolder> , provided by the TrendHolderTimeSeiresExtension extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reverse(
) → TimeSeries< T> -
Available on TimeSeries<
Reverses the time series in time.T> , provided by the TimeSeriesExtension extension -
takeLast(
int n) → TimeSeries< T> -
Available on TimeSeries<
Returns the lastT> , provided by the TimeSeriesExtension extensionnelements 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