Class/Object

carldata.series

TimeSeries

Related Docs: object TimeSeries | package series

Permalink

case class TimeSeries[V](idx: Vector[Instant], ds: Vector[V]) extends Product with Serializable

TimeSeries contains data indexed by DateTime. The type of stored data is parametric.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TimeSeries
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TimeSeries(d: Seq[(Instant, V)])

    Permalink
  2. new TimeSeries(idx: Vector[Instant], ds: Vector[V])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addMissing(delta: Duration, f: ((Instant, V), (Instant, V), Instant) ⇒ V): TimeSeries[V]

    Permalink

    Add missing points to the time series.

    Add missing points to the time series. The output series will have all its own points and some new points if there are missing at every duration.

    delta

    Expected distance between points

    f

    This function will approximate missing points.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val dataPoints: Vector[(Instant, V)]

    Permalink
  8. val ds: Vector[V]

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def filter(f: ((Instant, V)) ⇒ Boolean): TimeSeries[V]

    Permalink

    Filter by index and value

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def get(i: Int)(implicit num: Numeric[V]): V

    Permalink

    Safe get.

    Safe get. If element is out of the bounds then 0 is returned

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def groupByTime(g: (Instant) ⇒ Instant, f: (Seq[(Instant, V)]) ⇒ V): TimeSeries[V]

    Permalink

    Aggregate data points.

    Aggregate data points.

    g

    This function transforms current data point time into new time. All points with the same time will be integrated into single point

    f

    This function defines how to aggregate points with the same transformed time

  15. def head: Option[(Instant, V)]

    Permalink
  16. val idx: Vector[Instant]

    Permalink
  17. val index: Vector[Instant]

    Permalink
  18. def isEmpty: Boolean

    Permalink

    Check is series is empty

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def join[U](ts: TimeSeries[U]): TimeSeries[(V, U)]

    Permalink

    Inner join.

    Inner join. Only include points which have the same data in both series

  21. def joinLeft[U](ts: TimeSeries[U], default: U): TimeSeries[(V, U)]

    Permalink

    Left join.

    Left join. If right series doesn't have a data point then put default value.

  22. def joinOuter[U](ts: TimeSeries[U], defaultLeft: V, defaultRight: U): TimeSeries[(V, U)]

    Permalink

    Outer join.

    Outer join. If one of the series doesn't have a data point then put default(left or right) value.

  23. def last: Option[(Instant, V)]

    Permalink

    Get last element of the series

  24. val length: Int

    Permalink
  25. def map(f: ((Instant, V)) ⇒ V): TimeSeries[V]

    Permalink

    Map by index and value.

    Map by index and value. Create new values

  26. def mapValues[U](f: (V) ⇒ U): TimeSeries[U]

    Permalink

    Map over values.

  27. def merge(ts: TimeSeries[V]): TimeSeries[V]

    Permalink

    Merges series A into B

  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def nonEmpty: Boolean

    Permalink

    Check is series is non empty

  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. def resample(delta: Duration, f: ((Instant, V), (Instant, V), Instant) ⇒ V)(implicit num: Numeric[V]): TimeSeries[V]

    Permalink

    Resample given TimeSeries with indexes separated by delta.

    Resample given TimeSeries with indexes separated by delta. This function will ensure that series is evenly spaced.

    delta

    Distance between points

    f

    Function which approximates missing points

  33. def resampleWithDefault(delta: Duration, default: V)(implicit num: Fractional[V]): TimeSeries[V]

    Permalink

    Resample series.

    Resample series. If there are any missing points then they will be replaced by given default value

  34. val resolution: Duration

    Permalink

    Most frequent duration in time series

  35. def rollingWindow(windowSize: Duration, f: (Seq[V]) ⇒ V): TimeSeries[V]

    Permalink

    Rolling window operation

  36. def shiftTime(d: Duration): TimeSeries[V]

    Permalink

    Shift index by specific time duration

  37. def slice(start: Instant, end: Instant): TimeSeries[V]

    Permalink

    Get slice of series with left side inclusive and right side exclusive this operation is based on index.

  38. def sortByIndex: TimeSeries[V]

    Permalink

    Return new Time Series where index is always increasing

  39. def splitAt(g: Instant): (TimeSeries[V], TimeSeries[V])

    Permalink

    Get tuple of series with right side inclusive to the requested split instant.

    Get tuple of series with right side inclusive to the requested split instant.

    g

    Instant to split the series

  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def take(n: Int): TimeSeries[V]

    Permalink

    Return series with first n elements *

  42. val values: Vector[V]

    Permalink
  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped