Skip to main content

View flow data as Sankey diagrams.

Project description

floWeaver

PyPI Status Documentation Status Test Status Coverage Status DOI

by Rick Lupton and Contributors

Many kinds of data can be thought of as ‘flows’: energy and materials moving through industry, money flowing through the economy, telephone lines moving between providers, voters moving between parties. floWeaver helps you to exchange and analyse flow data and visualise it using Sankey diagrams.

For example, here is some data on flows of fruit from farms to customers:

docs/demo_table.png

With floWeaver you can visualise this as a variety of Sankey diagrams depending on what you want to show:

docs/demo_animation/demo.gif

Although there are a variety of tools for working with flow data and Sankey diagrams in particular contexts, there are no open data formats for sharing data between tools and domains. We aim to provide a common data format and data converters to support interoperability and open data.

You are free to copy, modify, and distribute floWeaver with attribution under the terms of the MIT license. See the LICENSE file for details. If you find it useful please acknowledge that by citing floWeaver (see below).

Get started using floWeaver

floWeaver is a Python package, but you can successfully use it as a data analysis tool even without too much familiarity with Python. The best way to get started is to use it in a Jupyter notebook (more advanced users can use it outside the notebook environment to export JSON/SVG but this is still under development; see this comment).

🚀 Try floWeaver online with no installation: Quickstart tutorial on Binder.

To install floWeaver locally, you need Python 3 installed (you might want to install it using Anaconda or Miniconda); see the installation page for full details.

Installation using conda

You can install floweaver using conda:

conda install -c conda-forge floweaver

You likely also want ipysankeywidget to show Sankey diagrams in the Jupyter notebook. Install it using conda:

conda install -c conda-forge ipysankeywidget

(that’s it — the jupyter nbextensions are enabled automatically when using conda)

Installation using pip

Alternatively, you can install floweaver using pip:

pip install floweaver

You likely also want ipysankeywidget to show Sankey diagrams in the Jupyter notebook. Install this using pip and enable:

pip install ipysankeywidget
jupyter nbextension enable --py --sys-prefix ipysankeywidget

ipywidgets also needs to be enabled. You might have already done this, but missing it out is a common cause of problems so it doesn’t hurt to do it again!

jupyter nbextension enable --py --sys-prefix widgetsnbextension

Quickstart tutorial

To get started, open the quickstart tutorial in Jupyter notebook and step through the notebook cells to produce the fruit example shown above.

Find out more 📖

Tutorials, cookbook examples, and API documentation are all available on ReadTheDocs

If you have a question that isn’t answered please open an issue on GitHub, if there isn’t one there already. You can also use the Gitter chatroom for discussion and questions.

Contributing 🎁

Thanks for your interest in contributing! There are many ways to contribute to floWeaver: sharing examples of work done using it, suggestions for improving the documentation, examples of things that are more difficult than they should be or don’t work, as well as actual fixes to code and documentation. To get started see CONTRIBUTING.md and our code of conduct.

We have a detailed Roadmap showing what we are working on up to May 2018; beyond that there is the longer-term Roadmap. We also have good first issues grouped by type of contribution.

How does it work?

floWeaver builds on the approach described in the paper Hybrid Sankey diagrams: Visual analysis of multidimensional data for understanding resource use. It uses ipysankeywidget and d3-sankey-diagram for actually drawing the Sankey diagrams.

docs/project_components.png

Citing floWeaver

If floweaver has been significant in a project that leads to a publication, please acknowledge that by citing the paper linked above:

R. C. Lupton and J. M. Allwood, ‘Hybrid Sankey diagrams: Visual analysis of multidimensional data for understanding resource use’, Resources, Conservation and Recycling, vol. 124, pp. 141–151, Sep. 2017. DOI: 10.1016/j.resconrec.2017.05.002

and/or citing the software itself; you can get a citation of the latest version from Zenodo.

Contributors

  • Leo Paoli (documentation)

  • Konstantin Stadler (issues & use in IOA)

  • Dhanuka Lakshan

  • Andreas Fehlner

  • Elliott Sales de Andrade

  • @abmakko (the logo)

  • Chris Barnes (@clbarnes)

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

floweaver-2.0.1.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

floweaver-2.0.1-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file floweaver-2.0.1.tar.gz.

File metadata

  • Download URL: floweaver-2.0.1.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for floweaver-2.0.1.tar.gz
Algorithm Hash digest
SHA256 f2f7bb67af1a20137bbb05f95187d7f9be9c106b37e71650b71d6be0ac6276a3
MD5 032603900f372d676f189c0848eb2882
BLAKE2b-256 82a68c9f318e853b6902df579532c73875408de78c30013436cc05ca0f967e7c

See more details on using hashes here.

File details

Details for the file floweaver-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: floweaver-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for floweaver-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3252df9fc628f86b4d39d6d346e87d432378fa2ca7b36c37fc10cef837fd263f
MD5 dbe84df1fc9568840531729bb811d9fc
BLAKE2b-256 64aeaeb75d5484ead8012673c0487c6790e8fd19039c1db56184e3c2c567e656

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