Skip to main content

Event detection and transformation for time-series data

Project description

Build Status Version Status

A package to search for events in time-series data that match a boolean condition. Various transformation functions are built in to filter and alter events.

See Trouve’s documentation at


trouve is on the Python Package Index (PyPI):

pip install trouve


  • numpy
  • pandas
  • toolz


This finds events in a short sample of 1Hz, time-series data and filters out events based on their duration

>>> import numpy as np
>>> from trouve import find_events
>>> import trouve.transformations as tt
>>> x = np.array([1, 2, 2, 2, 0, 1, 2, 0, 2, 2])
>>> period = 1 # period = 1 / sample_rate
>>> duration_filter = tt.filter_durations(2, 3)
>>> events = find_events(x == 2, period, duration_filter)
>>> len(events)
>>> events.as_array()
array([ 0.,  1.,  1.,  1.,  0.,  0.,  0.,  0.,  1.,  1.])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for trouve, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size trouve-0.4.2.tar.gz (9.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page