Currently Flowmap accepts a list of Flow objects as arguments. This generates the following type of code1 when performing the map operation with python code instead of using the CLI interface:
from flowmapper.utils import read_field_mapping, read_flowlist
from flowmapper.flowmap import Flowmap
from flowmapper.flow import Flow
fields = read_field_mapping('config/simapro-ecoinvent.toml')
source_flows = [Flow.from_dict(flow, fields['source']) for flow in read_flowlist('data/agribalyse-3.1.1-biosphere.json')]
target_flows = [Flow.from_dict(flow, fields['target']) for flow in read_flowlist('data/ecoinvent-3.7-biosphere.json')]
flowmap = Flowmap(source_flows, target_flows)
It would be convenient if the following was possible:
from flowmapper.flowmap import Flowmap
flowmap = Flowmap('data/agribalyse-3.1.1-biosphere.json', 'data/ecoinvent-3.7-biosphere.json', 'config/simapro-ecoinvent.toml')
Currently
Flowmapaccepts a list ofFlowobjects as arguments. This generates the following type of code1 when performing the map operation with python code instead of using the CLI interface:It would be convenient if the following was possible:
Footnotes
For example to generate
status.mdinstatus.qmd↩