Timeseria: an object-oriented time series processing library
Stefano Alberto Russo, Giuliano Taffoni, Luca Bortolussi
TL;DR
Timeseria addresses the core difficulties of time series analysis by introducing an object-oriented representation built from well-defined building blocks (Points, Slots, TimeUnits) that cleanly separate punctual observations from aggregates and explicitly model data losses and calendar-time concerns. The library provides a cohesive stack of base data structures, transformations, operations, and model abstractions that enable consistent resampling, aggregation, and plug-in modeling, along with an interactive plotting engine. Key contributions include the differentiated data structures for time-aware data, explicit handling of data losses and time-zone/DST effects, and a framework that supports both built-in models and user-defined Forecasters, Reconstructors, and Anomaly Detectors. The approach improves reproducibility and reduces common time-series pitfalls, with practical impact across research and industry domains, and future work targeting probabilistic models and performance optimizations.
Abstract
Timeseria is an object-oriented time series processing library implemented in Python, which aims at making it easier to manipulate time series data and to build statistical and machine learning models on top of it. Unlike common data analysis frameworks, it builds up from well defined and reusable logical units (objects), which can be easily combined together in order to ensure a high level of consistency. Thanks to this approach, Timeseria can address by design several non-trivial issues which are often underestimated, such as handling data losses, non-uniform sampling rates, differences between aggregated data and punctual observations, time zones, daylight saving times, and more. Timeseria comes with a comprehensive set of base data structures, data transformations for resampling and aggregation, common data manipulation operations, and extensible models for data reconstruction, forecasting and anomaly detection. It also integrates a fully featured, interactive plotting engine capable of handling even millions of data points.
