Skip to content

Commit

Permalink
EODC
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi authored and romainsacchi committed Apr 9, 2024
1 parent 731f095 commit 7980ed1
Show file tree
Hide file tree
Showing 7 changed files with 62,940 additions and 44 deletions.
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include pathways/data/*.txt
include premise/data/*.csv
include premise/data/*.json
include premise/data/*.yml
include pathways/data/*.xlsx
include pathways/data/*.json
include pathways/data/*.yaml
46 changes: 25 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@

# pathways

``pathways`` is a Python package that characterizes
environmental impacts of energy systems and transition scenarios using
Life Cycle Assessment (LCA).

``pathways`` is a work in progress. It reads in
scenarios and corresponding premise-generated LCA databases,
solve double-accounting issues and calculates the environmental
impacts over a defined period.
``pathways`` is a Python package that characterizes the
environmental impacts of products, secctors or energy systems
and transition scenarios over time using Life Cycle Assessment (LCA).
Compared to traditional scenario results from energy models,
``pathways`` provides a more detailed and transparent view of the
environmental impacts of a scenario by resolving supply chains
between producers and consumers (as an LCA does). Hence, direct
and indirect emissions are accounted for, and double-counting
issues are partially resolved.

``pathways`` is initially designed to work with data packages produced
by ``premise``, but can be used with any IAM scenarios and LCA databases.

## Installation

Expand All @@ -21,7 +25,7 @@ can be installed from the Github repo with ``pip``:

```bash

pip install git+https://github.com/polca/pathways.git
pip install pathways

```

Expand All @@ -36,7 +40,7 @@ or in a Python interpreter.
```python

from pathways import Pathways
p = Pathways(datapackage="sample/datapackage.json")
p = Pathways(datapackage="some datapackage.zip")
p.calculate(
methods=[
"EF v3.1 - acidification - accumulated exceedance (AE)"
Expand All @@ -48,7 +52,7 @@ p.calculate(

```

The argument `datapackage` is the path to the datapackage.json file
The argument `datapackage` is the path to the datapackage.zip file
that describes the scenario and the LCA databases -- see dev/sample.
The argument `methods` is a list of methods to be used for the LCA
calculations. The argument `years` is a list of years for which the
Expand All @@ -62,14 +66,20 @@ defined in the datapackage.json file are used, which can be very
time-consuming.

Once calculated, the results of the LCA calculations are stored in the `.lcia_results`
attribute of the `Pathways` object, and can be formatted in an array by calling `.display_results()`.
attribute of the `Pathways` object as an ``xarray.DataArray``.

```python

p.display_results()
p.lcia_results

```


It can be further formatted
to a pandas' DataFrame or export to a CSV/Excel file using the built-in
methods of ``xarray``.


which can then be visualized using your favorite plotting library.
![Screenshot](assets/screenshot.png)

Expand Down Expand Up @@ -104,11 +114,6 @@ Look through the GitHub issues for features. Anything tagged with
"enhancement" and "help wanted" is open to whoever wants to
implement it.

#### Provide IAM scenarios

The IAM scenarios are the core of the ``pathways`` package. If you
have access to IAM scenarios, please consider sharing them with us.

#### Write Documentation

``pathways`` could always use more documentation, whether as part of
Expand All @@ -117,15 +122,14 @@ blog posts, articles, and such.

#### Submit Feedback

The best way to send feedback is to file an issue on GitHub.


The best way to send feedback is to file an issue on the GitHub repository.

## Credits

### Contributors

* [Romain Sacchi](https://github.com/romainsacchi)
* Alvaro Hahn Menacho (https://github.com/alvarojhahn)


### Financial Support
Expand Down
2 changes: 1 addition & 1 deletion dev/generate datapackages.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.11.8"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 7980ed1

Please sign in to comment.