Sausage Links
Implementation of the Sausage Links algorithm base Swinging Door in Python.
Example of usage
>>> from datetime import datetime
>>> from pandas import read_csv, DataFrame
>>> df = DataFrame(
... [
... {
... "Date": datetime.strptime(date, "%Y-%m-%d"),
... "Price": value
... }
... for date, value in read_csv(
... "https://datahub.io/core/oil-prices/r/wti-daily.csv"
... ).values.tolist()
... ]
... )
>>> print(len(df))
9895
>>> df.plot(x="Date", y="Price")
>>> from sausage_links import sausage_links
>>> compress = DataFrame(
... list(
... {
... "Date": datetime.fromtimestamp(date),
... "Price": value
... }
... for date, value in sausage_links(
... iter(
... (date.timestamp(), value)
... for date, value in df.values.tolist()
... ), deviation=(1, .5), max_len=604_800,
... auto_dev_factor=200_000, ema_alpha=0.5
... )
... )
... )
>>> print(len(compress))
4177
>>> compress.plot(x="Date", y="Price")
Metadata
Release files for sausage-links 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sausage_links-1.0.0.tar.gz | 4.9 kB | Without provenance | Details for sausage_links-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sausage_links-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for sausage_links-1.0.0-py3-none-any.whl |
Total release size: 9.8 kB
Release files / sausage_links-1.0.0.tar.gz
| Download URL | sausage_links-1.0.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
834f33b491ab40d8c2f793a199b5480f19ee4b68b5155f8588009f8ae8accc82
|
|
BLAKE2b-256 checksum How to use checksums |
d0791e4f705cb50bcc58c9cbb47bb179ca738fba13c1ea3ad4ce015519ec08bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / sausage_links-1.0.0-py3-none-any.whl
| Download URL | sausage_links-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6aaaade62b773aecd09d457e0563bbf75f4121bbaa635f5bef055d5151df7663
|
|
BLAKE2b-256 checksum How to use checksums |
e74efc9b06f024380ce6d4aadeedd3506e501bd8b6e8d96f94bb023ae84c973b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for sausage-links 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.