Skip to main content

Import HESTIA data directly into Brightway

Project description

Brightway-Hestia bridge

PyPI Status Python Version License

Read the documentation at https://docs.brightway.dev/projects/hestiabridge Tests Codecov

pre-commit Black

bw_hestia_bridge is a library to interact with Hestia and create brightway databases from its data.

Installation

You can install bw_hestia_bridge via pip from PyPI:

$ pip install bw_hestia_bridge

Mapping Hestia cycles to the Brightway mental model

Hestia is not a linked network of unit processes, but detailed data on specific production systems. As they are agricultural, almost all of these systems have multiple outputs, and many of these outputs require further treatment. For example, in the pig system, there are three types of excreta produced, which go to deep bedding, which go to composting. Hestia doesn't seem to have a waste treatment for the final processed excreta.

Because these follow-on activities (Hestia calls them Transformations) are multi-input and multi-output, and because there is no guarantee that the respective ratios of these outputs align with the next stage inputs, we will do the following:

For each transformation, we create a new unit process. The reference product of this process will be the output with the highest mass.

For the other outputs, we will create proxy treatment activities. These proxies will handle any potential stoichiometric disparities.

If a transformation is a leaf node, i.e. it has inputs but no consumers for each outputs, we will create proxy consumers for each output other than the reference product.

We then go back to the original unit process, and add proxy consumers for each output which is not the reference product (i.e. marked "primary": true) or the reference product of a waste treatment.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, bw_hestia_bridge is free and open source software.

Issues

If you encounter any problems, please [file an issue] along with a detailed description.

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

bw_hestia_bridge-0.1.0.dev0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

bw_hestia_bridge-0.1.0.dev0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file bw_hestia_bridge-0.1.0.dev0.tar.gz.

File metadata

  • Download URL: bw_hestia_bridge-0.1.0.dev0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for bw_hestia_bridge-0.1.0.dev0.tar.gz
Algorithm Hash digest
SHA256 0a5c78e402df0a865c0b3f41c1027016e97ef97d07e4c7d040bb560a0e805f4d
MD5 8b01228b4a188cd1264e7c41e9d5743d
BLAKE2b-256 239a766008bf1b73312a2b8abc34aee239f4e2fef1970cbcf0d6408fba1f1aed

See more details on using hashes here.

File details

Details for the file bw_hestia_bridge-0.1.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for bw_hestia_bridge-0.1.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2aa971058a061d9499070a2e21375198b906817fd38e6a8773dfd826592e3a9
MD5 09c495af275114ca7903e5d6de8e0c07
BLAKE2b-256 930e9af87599e27d06a13d6daa3d2a353f6a5ddef23294f5b55c9c34f834b0ca

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