haasad / EcoInventDownLoader

Download, unpack and import ecoinvent into your brightway2 project in one simple step
MIT License
13 stars 6 forks source link
brightway2 ecoinvent python

Conda Version Conda Version Anaconda-Server Badge Anaconda-Server Badge Build Status

EcoInventDownLoader (eidl)

The EcoInventDownLoader (eidl) is a small python package that automates the somewhat tedious process of adding an ecoinvent database to your brightway2 project. Without eidl the following steps are required:

With eidl, the above steps can all be carried out with a single command from a jupyter notebook or any python shell:

eidl.get_ecoinvent()

You will be asked to enter your ecoinvent username and password, and which version and system model you require. The database will then be added to your brightway2 project. Download and extraction are carried out in the background in a temporary directory, which is cleared after the import and therefore doesn't use up your disk space.

Prerequisites

Installation

conda install -c conda-forge eidl

Usage

import eidl
import brightway2 as bw

bw.projects.set_current('eidl_demo')

bw.bw2setup()
eidl.get_ecoinvent()

See also the example notebook for more details.