brightway-lca / brightway2-io

Importing and exporting for the Brightway LCA framework
BSD 3-Clause "New" or "Revised" License
26 stars 40 forks source link

How to export database with location information of technosphere #229

Closed Cermouth closed 8 months ago

Cermouth commented 8 months ago

Hello there,

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:

image

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:

image

Could anyone give some hints in revising strategies or somewhere in the functions? Thanks for any ideas.

cmutel commented 8 months ago

@Cermouth Hi! This isn't a technical problem with the code, so filing an issue isn't the best way to get help. Please either ask a question on Stack Overflow (https://stackoverflow.com/tags/brightway/) or use the Brightway Beginners mailing list (https://brightway.groups.io/g/beginners)