Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(data): Add irrigation to the Ecoinvent organic cotton #832

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/common/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ def import_simapro_csv(
print("### Applying strategies...")
# exclude strategies/migrations
database.strategies = (
first_strategies
list(first_strategies)
+ [
s
for s in database.strategies
if not any([e in repr(s) for e in excluded_strategies])
]
+ other_strategies
+ list(other_strategies)
)

database.apply_strategies()
Expand Down
29 changes: 29 additions & 0 deletions data/import_ecoinvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,33 @@
]


def organic_cotton_irrigation(db):
"""add irrigation to the organic cotton"""
for ds in db:
if ds.get("simapro metadata", {}).get("Process identifier") in (
"MTE00149000081182217968", # EI 3.9.1
"EI3ARUNI000011519618166", # EI 3.10
):
# add: irrigation//[IN] market for irrigation;m3;0.75;Undefined;0;0;0;;
ds["exchanges"].append(
{
"amount": 0.75,
"categories": ("Materials/fuels",),
"comment": "",
"loc": 0.75,
"name": "irrigation//[IN] market for irrigation",
"negative": False,
"type": "technosphere",
"uncertainty type": 2,
"unit": "cubic meter",
}
)
return db


STRATEGIES = [organic_cotton_irrigation]


def main():
projects.set_current(PROJECT)
# projects.create_project(PROJECT, activate=True, exist_ok=True)
Expand All @@ -31,6 +58,7 @@ def main():
import_simapro_csv(
join("..", "..", "dbfiles", EI391),
db,
first_strategies=STRATEGIES,
excluded_strategies=EXCLUDED,
)
else:
Expand All @@ -40,6 +68,7 @@ def main():
import_simapro_csv(
join("..", "..", "dbfiles", EI310),
db,
first_strategies=STRATEGIES,
excluded_strategies=EXCLUDED,
)

Expand Down
28 changes: 3 additions & 25 deletions data/textile/activities.json
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@
{
"displayName": "Production de fibres de coton bio",
"info": "Textile > Matières > Matières naturelles",
"source": "Custom",
"source": "Ecoinvent 3.9.1",
"search": "fibre, cotton, organic//[RoW] fibre production, cotton, organic, ginning",
"correctif": "",
"step_usage": "Matières",
"uuid": "coton-bio",
Expand All @@ -603,30 +604,7 @@
"geographicOrigin": "Asie - Pacifique",
"defaultCountry": "CN",
"priority": 100,
"unit": "kg",
"impacts": {
"acd": 0.0306797,
"cch": 0.680164,
"etf": 5.1314,
"etf-c": 5.2637,
"fru": 1.65306,
"fwe": 0.0121382,
"htc": 5.32889e-9,
"htc-c": 6.73849e-11,
"htn": -2.36397e-7,
"htn-c": 3.03781e-10,
"ior": 0.0037548,
"ldu": 696.27,
"mru": 9.15075e-7,
"ozd": 1.15859e-9,
"pco": 0.0042632,
"pma": 1.97418e-7,
"swe": 0.0813382,
"tre": 0.1392,
"wtu": 32.2334,
"ecs": 618.962439739018,
"pef": 736.2192841211813
}
"unit": "kg"
},
{
"displayName": "Production de chanvre",
Expand Down
8 changes: 4 additions & 4 deletions public/data/textile/processes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1102,11 +1102,11 @@
"alias": null
},
{
"name": "Production de fibres de coton bio",
"name": "fibre, cotton, organic//[RoW] fibre production, cotton, organic, ginning",
"displayName": "Production de fibres de coton bio",
"info": "Textile > Matières > Matières naturelles",
"unit": "kg",
"source": "Custom",
"source": "Ecoinvent 3.9.1",
"correctif": "",
"step_usage": "Matières",
"uuid": "coton-bio",
Expand All @@ -1130,8 +1130,8 @@
"swe": 0,
"tre": 0,
"wtu": 0,
"ecs": 618.9624397390182,
"pef": 736.2192841211813
"ecs": 421.8780180420624,
"pef": 488.6208132830078
},
"heat_MJ": 0,
"elec_pppm": 0,
Expand Down