Brightway2 : what is the model pattern for an xlsx database?

Viewed 42

I wanted to know if there is any .xlsx model to create my own Excel database that I'll import afterwards with Brightway2. I use Ecoinvent and I want to make a LCI database from an excel import. I vaguely know that the pattern is : Activity "name of the activity I create" ; unit ; Location ; production amount ; reference product ; database

Then Exchanges "name" ; amount ; Location ; Unit ; database

But what if I wanna create an activity based on ecoinvent exchanges ? I can't put a reference product and a database ? Pic of my excel database

2 Answers

BW allows you to customize your model ad hoc and there are some examples in the official docs, like this one. I have used a table format in .csv with these minimum headings (pattern): Activity database;Activity code;Activity name;Activity unit;Activity type;Exchange database;Exchange input;Exchange amount;Exchange unit;Exchange type;Exchange uncertainty type;Exchange loc;Exchange scale;Exchange negative See example in this git repo to import this dataset using this ad hoc importer

Brightway stores supply chains as graphs, with nodes and edges. We often call nodes "activities", but these can also be products, or elementary/biosphere flows, or however else you want to build your model. We also call edges exchanges. An edge links two nodes with a numerical amount. So, the only requirements are:

  • Each node must have a database and a code, which together uniquely identify a node.
  • Each edge must refer to the database and code of the source and target (aka input and output), and give an amount. Edges must also have a type, for the matrix builder to know which matrix the edges goes in (technosphere or biosphere), and the sign of the number (in the technosphere matrix, consumed inputs are negative, production is positive)

Everything else is optional, but for most humans, things like names, unit, locations, and reference products are convenient. I recommend you use them, but you can delete them from the template if you want.

You asked "But what if I wanna create an activity based on ecoinvent exchanges ? I can't put a reference product and a database?" I am not sure what would prevent you from getting the reference product, name, datbase label, or whatever of ecoinvent activities, this is quite normal.

Related