Skip to main content

A library for generating synthetic time series data

Project description

tssynth

Python 3.9+ License: MIT

Generate realistic synthetic time series data with customizable patterns, seasonality, and noise components. Perfect for testing time series algorithms, machine learning models, or generating sample datasets.

Features

Flexible Generation: Create time series with various components:

  • Linear, exponential, or custom trends
  • Multiple seasonality patterns
  • Configurable noise distributions
  • Anomaly injection

🚀 Easy to Use: Simple, intuitive API built on numpy and pandas

import tssynth as ts

# Generate a time series with multiple components
data = ts.generate(
    length=365,                    # One year of daily data
    trend="exponential",           # Exponential growth
    seasonality=["weekly", "yearly"],
    noise_type="gaussian",
    noise_level=0.05
)

Installation

pip install tssynth

Documentation

For detailed usage examples and API reference, visit our documentation.

Quick Examples

# Generate a simple trend
basic_trend = ts.generate(length=100, trend="linear")

# Add seasonality and anomalies
complex_ts = ts.generate(
    length=1000,
    trend="exponential",
    seasonality="monthly",
    anomalies={"frequency": 0.01, "magnitude": 3.0}
)

# Export to pandas DataFrame
df = complex_ts.to_dataframe()

Development

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black .
isort .

License

MIT License - See LICENSE file for details.

Author

Will Judge (williamjudge94@gmail.com)

Project details


Download files

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

Source Distribution

tssynth-0.2.0.tar.gz (89.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tssynth-0.2.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file tssynth-0.2.0.tar.gz.

File metadata

  • Download URL: tssynth-0.2.0.tar.gz
  • Upload date:
  • Size: 89.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tssynth-0.2.0.tar.gz
Algorithm Hash digest
SHA256 477ae32026687afb8675339ecf63ce41db5993acda2f297530c61b18b9afb4dc
MD5 bb4b0a1d5995af4fb1817d5f60e2d25e
BLAKE2b-256 e8ea1970173ef2b908968a30c67d9cb381bc6044ae06ca8f89bd7caf6d84f77c

See more details on using hashes here.

File details

Details for the file tssynth-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tssynth-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tssynth-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7dfe409cb71f8a5d1a35de688664d48c226e5c7da1f490077fb3dc0ebadde25
MD5 901c141caa7f25bb39a09f14a5ea59ad
BLAKE2b-256 3d8903785afc142f5610597d8a16232aad9b32bd54011c2ad3f6050c31d5aff5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page