Closed sl0wiiio closed 8 months ago
Thanks @sl0wiiio.
Please change KEYS
to fields
, both in your new code and in the existing function. This would make it consistent with other bw2io functions.
IMO, biosphere flows should never have locations - they are situated in time and space by their consuming or producing activities. But you should be able to add this field if you want 😛.
Thanks @sl0wiiio.
Please change
KEYS
tofields
, both in your new code and in the existing function. This would make it consistent with other bw2io functions.IMO, biosphere flows should never have locations - they are situated in time and space by their consuming or producing activities. But you should be able to add this field if you want 😛.
Dear @cmutel
Thanks for your answer. Yes, I agree with you. Biosphere flows should not have a location actually.
However, locations are unfortunately implemented for some of the biosphere flows in SimaPro (e.g., "Water, CH"). And because I am working with data from SimaPro, I'd rather extract the location and write it to a new field than leaving it in the biosphere flow name. That's because I like to have the data structured. :)
And because I am working with data from SimaPro, I'd rather extract the location and write it to a new field than leaving it in the biosphere flow name
Totally agree this is right way.
Using the function with a biosphere database where biosphere flows are unique based on parameters 'name', 'categories', 'unit' and 'location' will not work properly, because the variable KEYS is predefined within the function to only include parameters 'name', 'categories' and 'unit'.
Solution: move the KEYS variable from within the function to the function header to be able to have a dynamic input.