A Python library for generating synthetic time series data
Project description
Synthetic Time Series Data Generator
Generate realistic synthetic time series datasets with configurable dimensions,
metrics, composable trend functions, and injectable anomalies — via a Python API
or the tsdata CLI.
📚 Documentation
For complete details on features, API reference, CLI usage, and advanced configuration, visit our documentation site:
👉 https://manojmanivannan.github.io/ts-data-generator/
Features
- Realistic Data: Mimic real-world time series with trends, seasonality, and noise.
- Composable Trends: Layer multiple functions (Sinusoidal, Linear, AR Noise, Markov) to create complex signals.
- Injectable Anomalies: Simulate failures with point anomalies, missing data gaps, and concept drifts.
- Deterministic: Guaranteed reproducibility via a seedable RNG.
- CLI & API: Use the
tsdataCLI for rapid prototyping or the Python API for production pipelines. - Schema Imputing: Reverse-engineer generation configs from existing CSV datasets.
Quickstart
Installation
pip install ts-data-generator
CLI Usage
tsdata generate --start 2024-01-01 --end 2024-01-07 --granularity h \
--dims "region:US,EU,AP" \
--mets "sales:LinearTrend(slope=45)+SinusoidalTrend(amplitude=10,freq=24)" \
--output sales.csv
Python API
from ts_data_generator import DataGen
from ts_data_generator.utils.trends import SinusoidalTrend
dg = DataGen(seed=42)
dg.start_datetime = "2024-01-01"
dg.end_datetime = "2024-01-07"
dg.to_granularity("h")
dg.add_metric("temp", {SinusoidalTrend(amplitude=10, freq=24)})
df = dg.data
dg.plot()
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ts_data_generator-0.6.0.tar.gz.
File metadata
- Download URL: ts_data_generator-0.6.0.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd24f470ffa0c4647f7f97273b223d043879fe0cf9564f37872b914e490f8d34
|
|
| MD5 |
a4776492b887c01f4678d35dbebdf38e
|
|
| BLAKE2b-256 |
8160ffd446812fe7cea9e8f7aeb24b831bf3383125b39747987b44d0342a7c47
|
Provenance
The following attestation bundles were made for ts_data_generator-0.6.0.tar.gz:
Publisher:
ci.yaml on manojmanivannan/ts-data-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ts_data_generator-0.6.0.tar.gz -
Subject digest:
dd24f470ffa0c4647f7f97273b223d043879fe0cf9564f37872b914e490f8d34 - Sigstore transparency entry: 1710901412
- Sigstore integration time:
-
Permalink:
manojmanivannan/ts-data-generator@6a6c17e51af5906233375c6c4b913051fc7a9c78 -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/manojmanivannan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@6a6c17e51af5906233375c6c4b913051fc7a9c78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ts_data_generator-0.6.0-py3-none-any.whl.
File metadata
- Download URL: ts_data_generator-0.6.0-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e547d908acc5006771ceb3e488aed9fbe2167121ea481a783b73b3fc94c11ed5
|
|
| MD5 |
add85f2f6bc5274a3760a1125ebb8098
|
|
| BLAKE2b-256 |
b1d22cd5d37979054ff2093fc1d1a357c87ae26211c01271a7647f79b90bfea8
|
Provenance
The following attestation bundles were made for ts_data_generator-0.6.0-py3-none-any.whl:
Publisher:
ci.yaml on manojmanivannan/ts-data-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ts_data_generator-0.6.0-py3-none-any.whl -
Subject digest:
e547d908acc5006771ceb3e488aed9fbe2167121ea481a783b73b3fc94c11ed5 - Sigstore transparency entry: 1710901441
- Sigstore integration time:
-
Permalink:
manojmanivannan/ts-data-generator@6a6c17e51af5906233375c6c4b913051fc7a9c78 -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/manojmanivannan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@6a6c17e51af5906233375c6c4b913051fc7a9c78 -
Trigger Event:
push
-
Statement type: