Skip to content

Commit 6e9056c

Browse files
authored
Merge pull request #128 from USEPA/release_v1.1.4
Release v1.1.4
2 parents b16f092 + 8aacb54 commit 6e9056c

18 files changed

Lines changed: 186 additions & 32 deletions

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
os: [ubuntu-latest, windows-latest, macos-latest]
34-
py-version: ['3.9', '3.10', '3.11']
34+
py-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
3535

3636
steps:
3737
- uses: actions/checkout@v4

.github/workflows/test_methods.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: "3.10"
20+
python-version: "3.12"
2121

2222
- name: Update pip & install testing pkgs
2323
run: |

.zenodo.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"description": "Standardizes the format and flows of life cycle impact assessment (LCIA) data.",
3+
"license": "MIT",
4+
"title": "LCIA Formatter",
5+
"upload_type": "software",
6+
"creators": [
7+
{
8+
"affiliation": "Eastern Research Group, Inc.",
9+
"name": "Ben Young",
10+
"orcid": "https://orcid.org/0000-0001-6276-8670"
11+
},
12+
{
13+
"affiliation": "GreenDelta",
14+
"name": "Michael Srocka"
15+
},
16+
{
17+
"affiliation": "US Environmental Protection Agency",
18+
"name": "Wesley Ingwersen",
19+
"orcid": "https://orcid.org/0000-0002-9614-701X"
20+
},
21+
{
22+
"affiliation": "Eastern Research Group, Inc.",
23+
"name": "Ben Morelli",
24+
"orcid": "https://orcid.org/0000-0002-7660-6485"
25+
},
26+
{
27+
"affiliation": "Eastern Research Group, Inc.",
28+
"name": "Sarah Cashman",
29+
"orcid": "https://orcid.org/0000-0001-9859-9557"
30+
},
31+
{
32+
"affiliation": "Eastern Research Group, Inc.",
33+
"name": "Andrew Henderson",
34+
"orcid": "https://orcid.org/0000-0003-2436-7512"
35+
}
36+
],
37+
"access_right": "open"
38+
}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# LCIA formatter
2-
[![DOI](https://joss.theoj.org/papers/10.21105/joss.03392/status.svg)](https://doi.org/10.21105/joss.03392)
2+
[![JOSS](https://joss.theoj.org/papers/10.21105/joss.03392/status.svg)](https://doi.org/10.21105/joss.03392)
3+
[![DOI](https://zenodo.org/badge/188049640.svg)](https://zenodo.org/doi/10.5281/zenodo.7400857)
34
[![build](https://github.com/USEPA/LCIAformatter/actions/workflows/python-package.yml/badge.svg)](https://github.com/USEPA/LCIAformatter/actions/workflows/python-package.yml)
45

56
The LCIA formatter, or `lciafmt`, is a Python tool for standardizing the format and flows of life cycle impact assessment (LCIA) data. The tool acquires LCIA data transparently from its original
@@ -18,6 +19,7 @@ The LCIA Formatter v1 was peer-reviewed internally at USEPA and externally throu
1819
|ImpactWorld+ Endpoint*|International Reference Center for Life Cycle of Products, Services and Systems (CIRAIG)|[ImpactWorld+](http://www.impactworldplus.org/en/team.php)|
1920
|IPCC GWP|Intergovernmental Panel on Climate Change (IPCC)| |
2021
|FEDEFL Inventory Methods|US Environmental Protection Agency|[FEDEFL Inventory Methods](https://github.com/USEPA/LCIAformatter/wiki/Inventory-Methods)|
22+
|Cumulative Energy Demand|Federal LCA Commons|[FEDEFL Inventory Methods](https://github.com/USEPA/LCIAformatter/wiki/Inventory-Methods)|
2123

2224
\* only works on Windows installations
2325

lciafmt/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import pandas as pd
1414

1515
import lciafmt.cache as cache
16+
import lciafmt.ced as ced
1617
import lciafmt.fmap as fmap
1718
import lciafmt.jsonld as jsonld
1819
import lciafmt.traci as traci
@@ -34,6 +35,7 @@ class Method(Enum):
3435
TRACI = "TRACI 2.1"
3536
RECIPE_2016 = "ReCiPe 2016"
3637
FEDEFL_INV = "FEDEFL Inventory"
38+
CED = "Cumulative Energy Demand"
3739
ImpactWorld = "ImpactWorld"
3840
IPCC = "IPCC"
3941

@@ -122,6 +124,8 @@ def get_method(method_id, add_factors_for_missing_contexts=True,
122124
return ipcc.get()
123125
if method_id == Method.FEDEFL_INV:
124126
return fedefl_inventory.get(subset)
127+
if method_id == Method.CED:
128+
return ced.get()
125129

126130

127131
def clear_cache():

lciafmt/ced.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# ced.py (lciafmt)
2+
# !/usr/bin/env python3
3+
# coding=utf-8
4+
"""
5+
Generate method for Cumulative Energy Demand (CED)
6+
"""
7+
8+
import numpy as np
9+
import pandas as pd
10+
11+
import lciafmt
12+
from lciafmt.util import store_method
13+
14+
15+
def get() -> pd.DataFrame():
16+
17+
inv_orig = lciafmt.get_method(method_id = 'FEDEFL_INV', subset = ['ced'])
18+
inv = inv_orig.copy()
19+
inv['Indicator'] = ''
20+
inv['Method'] = 'Cumulative Energy Demand'
21+
22+
conditions = [
23+
inv['Flowable'].isin(['Wood, primary forest']),
24+
inv['Flowable'].isin(['Biomass', 'Softwood', 'Hardwood', 'Wood']),
25+
inv['Flowable'].isin(['Energy, hydro']),
26+
inv['Flowable'].str.contains('|'.join(['wind', 'solar', 'geothermal'])),
27+
inv['Flowable'].str.contains('Uranium'),
28+
inv['Flowable'].str.contains('|'.join(['Coal', 'Oil', 'Crude',
29+
'gas', 'Methane'])),
30+
]
31+
32+
indicators = ['Non-renewable, biomass',
33+
'Renewable, biomass',
34+
'Renewable, water',
35+
'Renewable, wind, solar, geothermal',
36+
'Non-renewable, nuclear',
37+
'Non-renewable, fossil',
38+
]
39+
inv['Indicator'] = np.select(conditions, indicators, default='')
40+
41+
## Original CED Method included the
42+
# "Energy, fossil, unspecified" technosphere flow;
43+
# this has been dropped
44+
# https://www.lcacommons.gov/lca-collaboration/National_Renewable_Energy_Laboratory/USLCI_Database_Public/dataset/FLOW/46dc4693-2f24-39d2-b69f-dd059737fd5e
45+
46+
## Original CED Method used HHV for biomass/wood flows
47+
# Some wood flows were removed after the original method in FEDEFLv1.0.8
48+
49+
# Dropped flows from FEDEFL inv method: "Hydrogen", "Energy, heat"
50+
inv = inv.query('Indicator != ""').reset_index(drop=True)
51+
52+
return inv
53+
54+
55+
if __name__ == "__main__":
56+
method = lciafmt.Method.CED
57+
df = get()
58+
store_method(df, method)
59+
lciafmt.util.save_json(method, df)
60+
# lciafmt.util.save_json(method, df, write_flows=True)

lciafmt/data/ReCiPe2016_endpoint_to_midpoint.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
,Toxicity - Human health (non-cancer),Human noncarcinogenic toxicity,Human health
99
,Water consumption - human health,Water consumption,Human health
1010
,Global Warming - Terrestrial ecosystems,Global Warming,Terrestrial ecosystems
11-
,Photochemical ozone formation - Terrestrial ecosystems,Ecosyste damage ozone formation,Terrestrial ecosystems
11+
,Photochemical ozone formation - Terrestrial ecosystems,Ecosystem damage ozone formation,Terrestrial ecosystems
1212
,Acidification - Terrestrial ecosystems,Terrestrial acidification,Terrestrial ecosystems
1313
,Toxicity - Terrestrial ecosystems,Terrestrial ecotoxicity,Terrestrial ecosystems
1414
,Water consumption - terrestrial ecosystems,Water consumption,Terrestrial ecosystems
1515
,Land use - occupation and transformation,Land occupation,Terrestrial ecosystems
1616
,Global Warming - Freshwater ecosystems,Global Warming,Freshwater ecosystems
1717
,Eutrophication - Freshwater ecosystems,Freshwater eutrophication,Freshwater ecosystems
1818
,Toxicity - Freshwater ecosystems,Freshwater ecotoxicity,Freshwater ecosystems
19-
,Water consumption -aquatic ecosystems,Water consumption,Freshwater ecosystems
19+
,Water consumption - aquatic ecosystems,Water consumption,Freshwater ecosystems
2020
,Toxicity - Marine ecosystems,Marine ecotoxicity,Marine ecosystems
2121
,Eutrophication - Marine ecosystems,Marine eutrophication,Marine ecosystems
2222
,Mineral resource scarcity,Mineral resource scarcity,Resources

lciafmt/data/description.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
base: >+
22
[Method][version] is built from LCIA Formatter v[LCIAfmt_version] and
3-
flows from the Federal Elementary Flow List (FEDEFL) v[FEDEFL_version]
3+
flows from v[FEDEFL_version] of the Federal Elementary Flow List (FEDEFL),
4+
using fedelemflowlist v[fedelemflowlist_version].
45
56
description: >+
67
[Method] source file: [url]
78
89
Source citation: [citation]
910
11+
mapping: >+
1012
[Method] flowable and context input files are maintained in the FEDEFL
1113
GitHub Repository: https://github.com/USEPA/fedelemflowlist
1214

lciafmt/data/lcia.bib

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,12 @@ @incollection{smith_earths_2021
4545
author = {Smith, Chris and Nicholls, Zebedee R. J. and Armour, Kyle and Collins, William and Forster, Piers and Meinshausen, Malte and Palmer, Matthew D. and Watanabe, Masahiro},
4646
year = {2021},
4747
}
48+
49+
@report{frischknecht_implementation_2007,
50+
title = {Implementation of life cycle impact assessment methods},
51+
url = {https://esu-services.ch/fileadmin/download/publicLCI/03_LCIA-Implementation.pdf},
52+
number = {ecoinvent report No. 3},
53+
author = {Frischknecht, Rolf and Jungbluth, Niels and Althaus, H. J. and Bauer, C. and Doka, G. and Dones, R. and Hischier, R. and Hellweg, S. and Humbert, S. and Köllner, T.},
54+
urldate = {2024-11-13},
55+
year = {2007},
56+
}

lciafmt/data/methods.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
"ReCiPe 2016 - Midpoint/E":"ReCiPe 2016 v1.1 midpoint method, Egalitarian version. The typical ReCiPe midpoint method used is the Hierarchist version."},
2626
"path": "recipe",
2727
"case_insensitivity": "True",
28-
"url": "http://www.rivm.nl/sites/default/files/2018-11/ReCiPe2016_CFs_v1.1_20180117.xlsx",
28+
"url": "https://www.rivm.nl/sites/default/files/2024-10/ReCiPe2016_CFs_v1.1_20180117.xlsx",
2929
"bib_id": "huijbregts_recipe_2017",
3030
"citation": "Huijbregts 2017",
3131
"source_type": "Excel file"
3232
},
3333
{
3434
"id": "FEDEFL_INV",
3535
"name": "FEDEFL Inventory",
36-
"version": "1.0.0",
36+
"version": "1.1.0",
3737
"path": "fedefl",
38-
"url": "http://www.github.com/usepa//Federal-LCA-Commons-Elementary-Flow-List",
38+
"url": "https://github.com/USEPA/fedelemflowlist/blob/master/fedelemflowlist/subset_list.py",
3939
"citation": "",
4040
"source_type": "FEDEFL Python function"
4141
},
@@ -49,7 +49,7 @@
4949
"ImpactWorld+ - Endpoint":"This method includes all global endpoint flows and their attributes."},
5050
"path": "impactworld",
5151
"case_insensitivity": "False",
52-
"url": "http://www.impactworldplus.org/en/writeToFile.php",
52+
"url": "https://www.dropbox.com/sh/2sdgbqf08yn91bc/AABIGLlb_OwfNy6oMMDZNrm0a/IWplus_public_v1.3.accdb?dl=1",
5353
"citation": "Bulle, Cecile, Manuele Margni, Laure Patouillard, Anne-Marie Boulay, Guillaume Bourgault, Vincent De Bruille, Viet Cao, et al. IMPACT World+: A Globally Regionalized Life Cycle Impact Assessment Method. The International Journal of Life Cycle Assessment 24, no. 9 (September 2019), 1653–74. https://doi.org/10.1007/s11367-019-01583-0",
5454
"source_type": "Access file"
5555
},
@@ -67,6 +67,17 @@
6767
},
6868
"citation": "Forster and Ramaswamy 2007 (AR4), Myhre and Shindell 2013 (AR5), Forster and Storelvmo 2021 (AR6)",
6969
"source_type": "csv"
70+
},
71+
{
72+
"id": "CED",
73+
"name": "Cumulative Energy Demand",
74+
"version": "1.0",
75+
"detail_note": "All heating values are per the FEDEFL, and the list of external references is found on the EPA FEDEFL GitHub at: https://github.com/USEPA/fedelemflowlist. This CED method is based on the categorization scheme used in Frischknecht et al. (2007) found in the ecoinvent report 'Implementation of Life Cycle Impact Assessment Methods.'",
76+
"path": "fedefl",
77+
"bib_id": "frischknecht_implementation_2007",
78+
"url": "https://github.com/USEPA/fedelemflowlist/blob/master/fedelemflowlist/subset_list.py",
79+
"citation": "Frischknecht et al. 2007",
80+
"source_type": ""
7081
}
7182

7283
]

0 commit comments

Comments
 (0)