A library for generating synthetic time series data
Project description
tssynth
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
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 tssynth-0.2.2.tar.gz.
File metadata
- Download URL: tssynth-0.2.2.tar.gz
- Upload date:
- Size: 88.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee8a581f7af0264f972eff59281ffb7e3802e78dc2b759efaa862ed31bed83eb
|
|
| MD5 |
fe363f45ad8580cf6f5551486fc9a6c2
|
|
| BLAKE2b-256 |
375aebbecc7700b396d939606d88cc49ea858cc9abcc65cf6ea4ad2432235e00
|
File details
Details for the file tssynth-0.2.2-py3-none-any.whl.
File metadata
- Download URL: tssynth-0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35bba817580b91b5bd55ae40ce00b1aaec799e93fbfd1ad2cc15b983ee604b0a
|
|
| MD5 |
a4e3797655278f8ff01fad7a40eef109
|
|
| BLAKE2b-256 |
9b5b3fde9b9ab24c3df6580d1557eee218907b2245cd9903f6c2d22967a0593d
|