polyviz 1.0.2

Last updated:

0 purchases

polyviz 1.0.2 Image
polyviz 1.0.2 Images
Add to Cart

Description:

polyviz 1.0.2

polyviz: An interface between brightway2 and D3.js
This is a Python package that provides an interface between the
brightway2 LCA framework and the D3.js JavaScript library.
It is designed to be used in Jupyter notebooks, and provides
interactive visualizations of LCA results.



This interface extends the capabilities of d3blocks, and make it compatible
with results generated by brightway2.
polyviz allows the following visualizations to be created from LCA results:

Sankey diagrams (example 1, example 2)
Chord diagrams (example 1, example 2)
Force-directed graphs (example 1, example 2)
Tree maps (example 1, example 2)
Choropleth maps (example 1, example 2)
Violin plots (example 1, example 2)

Limitations
Tested only with brightway2 version 2.4.5.
Probably works with version 2.5 too, but not tested.
Installation
Install polyviz from PyPI:
pip install polyviz

and you will need to install a forked version of d3blocks:
pip install git+https://github.com/romainsacchi/d3blocks.git

Usage
Sankey diagrams
from polyviz import sankey
import bw2data

act = bw2data.get_activity(("some db", "some activity"))
method = ("some method", "some method")
sankey(activity=act, method=method)

sankey() returns a filepath to an HTML file that can be opened in a browser.
Alternatively, you can track a specific flow:
from polyviz import sankey
import bw2data

act = bw2data.get_activity(("some db", "some activity"))
flow_type = "kilowatt hour"
sankey(activity=act, flow_type=flow_type)

Other examples are available in the examples notebook.
Support
Do not hesitate to report issues in the Github repository.
Maintainers

Romain Sacchi

Contributing
See contributing.
License
BSD-3-Clause.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.