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

change units before linking #232

Closed ccomb closed 2 months ago

ccomb commented 7 months ago

In Agribalyse, some Electricity activities are in kWh and some others are in MJ. I get 87 unlinked technosphere activities at the end, some of them are these Electricity activities.

The simapro strategies first link_technosphere_based_on_name_unit_location and then change_electricity_unit_mj_to_kwh.

If I swap these two strategies, I end up with 57 unlinked activities instead of 87. The unlinked Electricity are now linked.

cmutel commented 7 months ago

Instead of flipping them, how about linking, changing the units, and then linking again? This is a special case and a bit of a pain, we definitely need a better strategy in the future though...

cmutel commented 2 months ago

Stopgap that will be removed when the current work on unit conversions is finished.