Created
April 27, 2024 07:10
-
-
Save cmutel/546492be3c4775909f80373e7267e680 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bw2data as bd | |
db = bd.Database("Transport routes") | |
# Compatible with legacy - "new_node" is 2.5 only | |
my_route = bd.new_activity( | |
name="Transport from CN to EU", | |
unit="trip", | |
code="surf-practice" | |
) | |
my_route.save() | |
my_route.new_exchange( | |
input=china_transport, | |
amount="200" # tkm | |
).save() | |
my_route.new_exchange( | |
input=sea_transport, | |
amount="10000" # tkm | |
).save() | |
my_route.new_exchange( | |
input=eur_transport, | |
amount="100" # tkm | |
).save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment