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.1.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.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tssynth-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 88c654fe3ef19baa4de7671c449df479b5f69dda84c2ff1f83f4723d265f82b0
MD5 dd50953fb856c2431367c66973f92cd6
BLAKE2b-256 2a6c2e4c889592a259ec72c6a16fd5e25144e1bf0871a8a33850b7285258231b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tssynth-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 412e59352931fd8e55ee77fcb26d792f71bba809239dd3fd15d2282a56bf1af8
MD5 b97b7433f26959e68938c6b87c56de3b
BLAKE2b-256 8afb1dc140cf0600979a681c14a179438792b06c024dddc9ac6171894cb0ae8d

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