A Python library for generating synthetic time series data
Project description
Synthetic Time Series Data Generator
A Python library for generating synthetic time series data
Special thanks to: Nike-Inc repo
Installation
PyPi (recommended)
You can install with pip directly by
pip install ts-data-generator
Repo
After cloning this repo and creating a virtual environment, run the following command:
pip install --editable .
Usage
- To check out constructing for time series data, check the sample notebook here
- To extract the trends from an existing data, check this sample notebook here
CLI
You can also use the command line utility tsdata to generate the data.
(venv) ~/ts-data-generator cli $ tsdata generate --help
Usage: tsdata generate [OPTIONS]
Generate time series data and save it to a CSV file.
Options:
--start TEXT Start datetime 'YYYY-MM-DD' [required]
--end TEXT End datetime 'YYYY-MM-DD' [required]
--granularity [FIVE_MIN|HOURLY|DAILY]
Granularity of the time series data [required]
--dims TEXT + separated list of dimensions definition of format 'name:function:values' [required]
--mets TEXT + separated list of metrics definition trends of format 'name:trend(*params)' [required]
--output TEXT Output file name [required]
--help Show this message and exit.
For example you can call this cli tool like below to generate data
tsdata generate \
--start "2019-01-01" \
--end "2019-01-12" \
--granularity "FIVE_MIN" \
--dims "product:random_choice:A,B,C,D" \
--dims "product_id:random_float:1,4" \
--dims "const:constant:5" \
--mets "sales:LinearTrend(limit=500)+WeekendTrend(weekend_effect=50)" \
--mets "trend:LinearTrend(limit=10)" \
--output "data.csv"
Release method
git tag <x.x.x>git push origin <x.x.x>
Project details
Release history Release notifications | RSS feed
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 ts_data_generator-0.2.1.tar.gz.
File metadata
- Download URL: ts_data_generator-0.2.1.tar.gz
- Upload date:
- Size: 833.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8746437bf5a49afca109be7ff050c33e7cd8b588f30a2ea6e3ee959500b92456
|
|
| MD5 |
1c921cd5f3a1fe5eff8fd6e52051fee4
|
|
| BLAKE2b-256 |
b9d4fcbddd8285db9a90f7a1040eb26f76190e0e9bb6846b1037343268729d35
|
Provenance
The following attestation bundles were made for ts_data_generator-0.2.1.tar.gz:
Publisher:
ci.yaml on manojmanivannan/ts-data-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ts_data_generator-0.2.1.tar.gz -
Subject digest:
8746437bf5a49afca109be7ff050c33e7cd8b588f30a2ea6e3ee959500b92456 - Sigstore transparency entry: 173372109
- Sigstore integration time:
-
Permalink:
manojmanivannan/ts-data-generator@b2433a71e97fe1b04911eb13a8170e4c095c25a6 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/manojmanivannan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@b2433a71e97fe1b04911eb13a8170e4c095c25a6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ts_data_generator-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ts_data_generator-0.2.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18db766112b536581a479cec0c56f556ec5825fe408eed523d6139428542f293
|
|
| MD5 |
ee21721d70a77c0461d43d528656bf19
|
|
| BLAKE2b-256 |
e8114e56349621d8658f5ffd8228cbd38b53d9bbd24e512a0abd720e6ea5e700
|
Provenance
The following attestation bundles were made for ts_data_generator-0.2.1-py3-none-any.whl:
Publisher:
ci.yaml on manojmanivannan/ts-data-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ts_data_generator-0.2.1-py3-none-any.whl -
Subject digest:
18db766112b536581a479cec0c56f556ec5825fe408eed523d6139428542f293 - Sigstore transparency entry: 173372115
- Sigstore integration time:
-
Permalink:
manojmanivannan/ts-data-generator@b2433a71e97fe1b04911eb13a8170e4c095c25a6 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/manojmanivannan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@b2433a71e97fe1b04911eb13a8170e4c095c25a6 -
Trigger Event:
push
-
Statement type: