Skip to content

SLU-biochar/bw2-parseAgribalyse

Repository files navigation

Attempt to import Agribalyse to a brightway2 database

Data source for Agribalyse

Note: the files from data.gouv.fr are the files from the Nexus OpenLCA converted to a more easily readable format, i.e. csv files, according to data.gouv.fr

CSV file structure

Tables are explained at https://www.data.gouv.fr/fr/datasets/agribalyse More info from the methodology page https://doc.agribalyse.fr/documentation/?cacheBust=1634652873522

Note: according to this person, the table TBL_EXCHANGES.csv contains 3.5 million lines (one line, for one technosphere or environmental exchange). However, 75% of these are equal to 0 and useless to parse. Saves a lot of time to just filter them out before writing the database to brighway! (discovered at own expenses)

Procedure

Inspired by Massimo's import for Exiobase.

  1. Load all the CSV files as Pandas [done]
  2. Identify all activities & products and create a dictionnary [done]

Issue here: the matrix is not square, there are more products than activities (missing activities can be replaced by dummy activities, hopefully)

  1. Write the dictionnary as bw2 database [done]
  2. Create a correspondance table between bw2's biosphere3 & the biosphere from Agribalyse [partly done, requires help/improvement]

Issue here: not so easy to get a 1-to-1 correspondance between the two, neither automatically, nor manually

  1. Loop on all biosphere & technosphere exchanges, and save exchanges to the database [done]

Issue here: need speed improvement, need handling of issues (missing activities/products)

  1. Do LCA calculations for all products/processes & validate them against implementation in SimaPro or openLCA [not done]

Validation is THE important step!

About

Code to parse agribalyse to brightway2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published