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.1.0.tar.gz (225.1 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.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tssynth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 44e309c4285ca5c20edd11bee4acf8f4f429b1056124f6993d0b3a7ccbbf517b
MD5 4120ad146e68addd98ce0f4ef628605b
BLAKE2b-256 6fad63dc5f15e223b9418d2ce7cc7167cdbfc8e16df57ea068f6e7d2a0d821c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tssynth-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22a1bf2bef501df5798de8576ebced3885de657460fad6fba6054e6d2701df75
MD5 7eec5e0e36dad88f81c6d253e1593206
BLAKE2b-256 094fa84c9d972b4235bf2f2de533d94d9c0c45bedf07d36d26761abeceefea79

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