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.6.tar.gz (36.2 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.6-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ausankey-1.6.tar.gz
Algorithm Hash digest
SHA256 25b6670f08d024f423e09fd2c827653abfedb6f9a78a2fccf59e668562bbd0ad
MD5 60694e0eebd393ca3c236fef4bfeb1de
BLAKE2b-256 d67866a5b3fe5400fb9e7508a52cde261d0cfeb8e58fae75fa73f49475ca2c6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ausankey-1.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: ausankey-1.6-py3-none-any.whl
  • Upload date:
  • Size: 35.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a1cfd3fd831f9615de312c0e95f873029942eed0224ea26a62aeba855ca8e7c8
MD5 06dbbf7f9b7d90b696270bdf365d77e8
BLAKE2b-256 84833ea3af9f43de2d5f98e02e3605303490989bfebb9c8debf3b03249abbe93

See more details on using hashes here.

Provenance

The following attestation bundles were made for ausankey-1.6-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