Skip to content

ts-shape¤

From raw industrial timeseries to OEE, SPC, and process-mining-ready event logs — in pure pandas.

A composable Python toolkit for loading, shaping, and analysing manufacturing & IoT signals. DataFrame in, DataFrame out — across loaders, transforms, features, and 290+ event detectors.

PyPI Downloads Python License

Get Started See Pipelines GitHub

pip install ts-shape

Why ts-shape?¤

  • DataFrame-First


    Every operation takes and returns a Pandas DataFrame. No proprietary formats, no lock-in — drop straight into any notebook or pipeline.

  • 290+ Detectors, 8 Packs


    OEE, SPC, cycle times, downtime, traceability, energy, maintenance — production use cases, batteries included.

  • Multi-Source Loading


    Parquet, S3, Azure Blob, TimescaleDB behind one interface. Vectorised, chunked, concurrent.

  • Process-Mining Native


    Every detector normalizes into a canonical OCEL 2.0 / XES event log — ready for pm4py, Celonis, or Disco.


Signals to event logs, in four steps¤

from ts_shape.loader.timeseries.parquet_loader import ParquetLoader
from ts_shape.events.production.machine_state import MachineStateEvents
from ts_shape.eventlog import to_event_log, to_event_log_ocel

# 1. Load raw signals
df = ParquetLoader.load_by_uuids("data/", ["machine-state"], "2024-01-01", "2024-01-31")

# 2. Detect events
intervals = MachineStateEvents(df, run_state_uuid="machine-state").detect_run_idle(min_duration="30s")

# 3. Build the canonical event log, then 4. export OCEL 2.0
log = to_event_log(intervals, detector="MachineStateEvents.detect_run_idle")
tables = to_event_log_ocel(log)

Any detector's output flows into the same canonical event log — that is what keeps the library working end to end.


Explore the docs¤

  • Quick Start


    Install and run your first pipeline in minutes.

    Get started

  • Guides


    Topic-focused guides from data acquisition to shift reports.

    See guides

  • Pipelines


    End-to-end workflows from raw signals to production KPIs.

    View pipelines

  • API Reference


    Complete auto-generated API documentation.

    Browse API


MIT License — Built for the timeseries community