unfold
unfold: removing the barriers to sharing and reproducing prospective life-cycle assessment databases - Published in JOSS (2023)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README and JOSS metadata -
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Scientific Fields
Repository
UNpacking For scenariO-based Lca Databases
Basic Info
Statistics
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 24
Topics
Metadata Files
README.md
unfold
Publicly share data packages that allow reproducing LCA databases based on licensed data.
If you use this software, please cite the following article:
Sacchi, R., (2023). unfold: removing the barriers to sharing and reproducing prospective life-cycle assessment databases. Journal of Open Source Software, 8(83), 5198, https://doi.org/10.21105/joss.05198
What does unfold do?
unfold is a Python package that allows "folding" and "unfolding"
LCA databases derived from a source database (e.g., ecoinvent) without
exposing the licensed data it builds from.

The purpose of this package is to allow users to publicly share
LCA databases without sharing the source database, in the case
where the latter is under restrictive license. Hence, unfold
allows users to share instead data packages that allows other users
to reproduce the LCA database (provided they have the source database).
It is based on the brightway2 framework.
unfold is initially conceived to share premise-generated
databases (link), or any other
databases that have been heavily modified and derived
from a base which is under
restrictive licensing (i.e., ecoinvent).
Limitations
- only works with
brightway2at the moment - only tested wih ecoinvent 3.6, 3.7 and 3.8 (but should be working with any other source database in principle)
How to
Install
unfold is available on PyPI and can be installed with pip:
pip install unfold
Alternatively, you can clone the repository and install the library from the source code:
git clone https://github.com/polca/unfold.git
cd unfold
pip install -e .
It can also be installed from conda:
conda install -c romainsacchi unfold
Use
See also examples notebooks in the examples folder.
fold
unfold can "fold" several brightway2 databases
into a single data package. The data package is a zip file
containing the differences of the databases in relation
to a source database (including extra inventories),
as well as a metadata file that describes the databases
and their content.
```python
from unfold import Fold
import bw2data
# name of the brightway project containing
# both the source database and the databases to fold
bw2data.projects.set_current("some BW2 project")
f = Fold()
f.fold()
```
The resulting data package is saved in the current directory and can be shared with other users.
unfold
unfold can "unfold" a data package into one or several
brightway2 databases.
```python
from unfold import Unfold
import bw2data
# name of the brightway project containing
# both the source database and the databases to unfold
bw2data.projects.set_current("some BW2 project")
u = Unfold("a package name.zip")
u.unfold()
```
The file path given to the Unfold class can be either
absolute or relative to the current directory, or even a URL.
unfold a superstructure database (to be used with Activity Browser)
unfold can "unfold" a data package into a superstructure database
that can be used with the Activity Browser.
```python
from unfold import Unfold
import bw2data
# name of the brightway project containing
# both the source database and the databases to unfold
bw2data.projects.set_current("some BW2 project")
u = Unfold("a package name.zip")
u.unfold(superstructure=True)
```
This outputs a superstructure database in your brightway2 project, as well as a scenario difference file (Excel) in the current working directory.
Contributing
Unfold is an open-source project, and contributions are welcome. To contribute to the project, please create a pull request on the project's GitHub page. Before submitting a pull request, please make sure that your changes are properly documented and that all tests pass.
Issues
If you encounter any problems, please open an issue on the project's GitHub page. Please include a minimal working example that reproduces the problem. If you are reporting a bug, please include the version of the package you are using.
Support
If you need help using Unfold, please contact the author (see below).
Author
Romain Sacchi, PSI
License
Unfold is released under the MIT License. See the License file for more information.
Owner
- Name: POLCA
- Login: polca
- Kind: organization
- Repositories: 7
- Profile: https://github.com/polca
International collaborative for improving prospective life cycle assessment
JOSS Publication
unfold: removing the barriers to sharing and reproducing prospective life-cycle assessment databases
Tags
life cycle assessment prospective database premise scenarioCitation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Sacchi
given-names: Romain
orcid: "https://orcid.org/0000-0003-1440-0905"
doi: 10.5281/zenodo.7777717
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Sacchi
given-names: Romain
orcid: "https://orcid.org/0000-0003-1440-0905"
date-published: 2023-03-29
doi: 10.21105/joss.05198
issn: 2475-9066
issue: 83
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 5198
title: "unfold: removing the barriers to sharing and reproducing
prospective life-cycle assessment databases"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.05198"
volume: 8
title: "`unfold`: removing the barriers to sharing and reproducing
prospective life-cycle assessment databases"
GitHub Events
Total
- Release event: 3
- Watch event: 2
- Delete event: 1
- Push event: 9
- Create event: 3
Last Year
- Release event: 3
- Watch event: 2
- Delete event: 1
- Push event: 9
- Create event: 3
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| romainsacchi | r****s@m****m | 154 |
| romainsacchi | r****n@R****h | 11 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 11
- Total pull requests: 0
- Average time to close issues: 16 days
- Average time to close pull requests: N/A
- Total issue authors: 4
- Total pull request authors: 0
- Average comments per issue: 3.27
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- marc-vdm (4)
- mfastudillo (3)
- MaximeAgez (3)
- mkvdhulst (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
- actions/checkout v2 composite
- actions/checkout v1 composite
- conda-incubator/setup-miniconda v2 composite
- gabrielfalcao/pyenv-action v7 composite
- jamescurtin/isort-action master composite
- lgeiger/black-action v1.0.1 composite
- pypa/gh-action-pypi-publish master composite
- bw2data *
- bw2io ==0.8.7
- datapackage *
- numpy *
- pandas *
- prettytable *
- pyprind *
- pyyaml *
- scipy *
- sparse *
- wurst >=0.3.3
- bw2data *
- bw2io ==0.8.7
- datapackage *
- numpy *
- pandas *
- prettytable *
- pyprind *
- pyyaml *
- scipy *
- sparse *
- wurst >=0.3.3
