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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tssynth-0.1.2.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.1.2.tar.gz
Algorithm Hash digest
SHA256 b23fc9c1e3ee537cf5cced96fd154b0dd61971af706e28339b1a2ad67f2fe066
MD5 ad4764c30160b8ae80771b0688eca221
BLAKE2b-256 a1bb60803ae904229f4aaba84626cf6cd8edc313d03df07d85685a38c1543add

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tssynth-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 32197c31d821b64b8d6938967499aeb2095880b583c919e73075f87a2b81c2dc
MD5 43782f483081acd0e09956e0f8443b57
BLAKE2b-256 de0e682987f1f7950a061869ca1c05c2e7a31a331fd5fe9efe54cdb5116c4f29

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