Thank you for developing such a great tool for LCA researchers! I am new here and have a problem exporting database with location information of the technosphere from the Ecoinvent database.
Here is the code I used:
import os
import brightway2 as bw
import bw2io as bi
importer = bi.SingleOutputEcospold2Importer('C://Users/.../ecoinvent391_cutoff_ecoSpold02/datasets','e391_')
importer.apply_strategies()
importer.statistics()
importer.write_excel()
and the database written in Excel is like: enter image description here
I want to export data with the location of each activity, especially for the technosphere, which is "unknown" in the Excel but exists in the database when looking into ActivityBrowser: enter image description here
Could anyone give some hints in revising strategies or somewhere in the functions? Thanks for any ideas.
The command
importer.write_excel()
is only used to export the current state of the data on theimporter
object for debugging. If you want to export the database, write it first usingimporter.write_database()
. You can then iterate through the individual datasets and write them to whatever format you want, or trybw2io.export.write_lci_excel
to export to a standardized format.