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.5.tar.gz (36.1 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.5-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ausankey-1.5.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ausankey-1.5.tar.gz
Algorithm Hash digest
SHA256 0f34ee627147023d5943032a1f120e806a01fe2be46b684bfe3afb2d96115138
MD5 d7554a4dfe399b361d6c63a3499e624e
BLAKE2b-256 50ebee25cc71290f527c67f45bdc80a8236cd8d54ae248ea29130530a255997b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ausankey-1.5-py3-none-any.whl
  • Upload date:
  • Size: 35.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ausankey-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4f1392b797645d0336acfc094f2a515bb499f3c256b2209938cc95b2c1120ce6
MD5 fa24b5577b2605881a713c8a31345e03
BLAKE2b-256 78769e3f12666af8f0a506b126c726f3eb9956065aa05d585cf42c37046ed85c

See more details on using hashes here.

Provenance

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