This page was generated from docs/basics/time_series.ipynb. Interactive online version:

# Working with time series dataο

## Conceptsο

In Rockpool, temporal data (βtime seriesβ data) is encapsulated in a set of classes that derive from `TimeSeries`

. Time series come in two basic flavours: βcontinuousβ time series, which have been sampled at some set of time points but which represent values that can exist at any point in time; and βeventβ time series, which consist of discrete event times.

The `TimeSeries`

subclasses provide methods for extracting, resampling, shifting, trimming and manipulating time series data in a convenient fashion. Since Rockpool naturally deals with temporal dynamics and temporal data, TimeSeries objects are used to pass around time series data both as input and as output.

`TimeSeries`

objects have an implicit shared time-base at \(t_0 = 0\) sec. However, they can easily be offset in time, concatenated, etc.

**Housekeeping and import statements**

```
[1]:
```

```
# - Import required modules and configure
# - Switch off warnings
import warnings
warnings.filterwarnings("ignore")
# - Required imports
import numpy as np
from rockpool.timeseries import (
TimeSeries,
TSContinuous,
TSEvent,
set_global_ts_plotting_backend,
)
from IPython.display import Image
# - Use HoloViews for plotting
import sys
!{sys.executable} -m pip install --quiet colorcet holoviews
import colorcet as cc
import holoviews as hv
hv.extension("bokeh")
%opts Curve [width=600]
%opts Scatter [width=600]
```