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.4.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

ausankey-1.4-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ausankey-1.4.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for ausankey-1.4.tar.gz
Algorithm Hash digest
SHA256 549389011fc2dae8f7c8238006df1150b795bf811a571dbff8dfd4d4b04c9b35
MD5 8fb10e91c3f7b9ff2eaac57c8873f83a
BLAKE2b-256 886d710d42a6ad47e7fa7190a5b5de0dd9329416c1bc8f43138fa5d2a60822a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ausankey-1.4-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for ausankey-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0bb2820ccea9a4287f41e03291040a92c3189fa78f8f393bed0ec457890e62d9
MD5 26b2ec851b59c9a0402ce8f89e3e3374
BLAKE2b-256 a99f501d55cea3387b7343330d5f93e0b71cc4f4ad87cfaeb90e5dcd2e10d64e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page