Skip to main content

Sankey diagrams simply

Project description

ausankey

Uses matplotlib to create simple Sankey diagrams flowing only from left to right.

PyPI version Coverage Status

Python package Jekyll Pages Publish release

This package is available on PyPi and can be installed via:

pip install ausankey

User documentation for the repository is published via GitHub Pages: https://aumag.github.io/ausankey/

Code documentation by Mkdocs is available here: https://aumag.github.io/ausankey/reference/

Minimal example

example

import ausankey as sky
import matplotlib.pyplot as plt
import pandas as pd

data = pd.DataFrame([
  ("a",1.0,"ab",2.0,"a",1.0),
  ("a",1.0,"ba",0.8,"ba",0.4),
  ("c",1.5,"cd",0.5,"d",2.0),
  ("b",0.5,"ba",0.8,"ba",0.4),
  ("b",0.5,"ab",0.8,"a",1.0),
  ("d",2.0,"cd",0.4,"d",1.0),
  ("e",1.0,"e",1.0,"e",3.0),
])

plt.figure()
sky.sankey(
  data,
  sort      = top,
  titles    = ["Stage 1","Stage 2","Stage 3"],
  valign    = "center",
)
plt.show()

Requirements

  • Python 3.x
  • matplotlib
  • numpy
  • pandas

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

ausankey-1.7.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ausankey-1.7-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file ausankey-1.7.tar.gz.

File metadata

  • Download URL: ausankey-1.7.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ausankey-1.7.tar.gz
Algorithm Hash digest
SHA256 dfccbf52454979f8d3eed34b672120cf1ed027809ca6a3e4af3a87edf6f81317
MD5 457e1dd0e24df9b283c9e73afcc03399
BLAKE2b-256 35aeefb628f9790a7d470e45290e7f0c26ecf695b272cddb5fbbb83a7eab123f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ausankey-1.7.tar.gz:

Publisher: release.yml on AUMAG/ausankey

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ausankey-1.7-py3-none-any.whl.

File metadata

  • Download URL: ausankey-1.7-py3-none-any.whl
  • Upload date:
  • Size: 36.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ausankey-1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 abafd589703f1a9eb76d1c6d3aba04b19878cd9c74742477d288c474b1fb9b75
MD5 18f43dc5d33ca09ce90112ffc34ac757
BLAKE2b-256 58bf81b76e20a289bed165dcca8367aba526db4cdc18f6f7fae67dfe8d51ab76

See more details on using hashes here.

Provenance

The following attestation bundles were made for ausankey-1.7-py3-none-any.whl:

Publisher: release.yml on AUMAG/ausankey

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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