# dynamic_characterization This is a package for the dynamic characterization of Life Cycle Inventories with temporal information. It includes a collection of dynamic characterization functions for various environmental flows. We also provide a simple interface to apply these functions to an existing dynamic LCI (coming from, e.g., [bw_temporalis](https://github.com/brightway-lca/bw_temporalis) or [bw_timex](https://github.com/brightway-lca/bw_timex)). The following dynamic characterization functions are currently included: | module |impact category | metric | covered emissions | source |--------|-------|----------|----------|--| | ipcc_ar6 | climate change | radiative forcing | 247 GHGs | radiative efficiencies & lifetimes from [IPCC AR6 Ch.7](https://www.ipcc.ch/report/ar6/wg1/chapter/chapter-7/) | | original_temporalis_functions| climate change | radiative forcing | CO2, CH4 |[bw_temporalis](https://github.com/brightway-lca/bw_temporalis/tree/main)| ## What do dynamic characterization functions do? The functions are meant to work with a common input format of the dynamic inventory, collected in a pandas DataFrame that looks like this: | date | amount | flow | activity | |-------|-------|------|----------| | 101 | 33 | 1 | 2 | | 312 | 21 | 4 | 2 | Each function takes one row of this dynamic inventory dataframe (i.e. one emission at one point in time) and transform it according to some metric. The output generated by applying a very simple function to both rows of the input dataframe could look like: | date | amount | flow | activity | |------|--------|------|----------| | 101 | 33 | 1 | 2 | | 102 | 31 | 1 | 2 | | 103 | 31 | 1 | 2 | | 312 | 21 | 4 | 2 | | 313 | 20 | 4 | 2 | | 314 | 19 | 4 | 2 | ## What do dynamic characterization functions look like? Here's an example of what such a function could look like: ```python def example_characterization_function(series: namedtuple, period: int = 2) -> namedtuple: date_beginning: np.datetime64 = series.date.to_numpy() dates_characterized: np.ndarray = date_beginning + np.arange( start=0, stop=period, dtype="timedelta64[D]" ).astype("timedelta64[s]") amount_beginning: float = series.amount # in reality, this would probably something more complex like an exponential decay function amount_characterized: np.ndarray = amount_beginning - np.arange( start=0, stop=period, dtype="int" ) return namedtuple("CharacterizedRow", ["date", "amount", "flow", "activity"])( date=np.array(dates_characterized, dtype="datetime64[s]"), amount=amount_characterized, flow=series.flow, activity=series.activity, ) ``` ## Support If you have any questions or need help, do not hesitate to contact Timo Diepers ([timo.diepers@ltt.rwth-aachen.de](mailto:timo.diepers@ltt.rwth-aachen.de)) ```{toctree} --- hidden: maxdepth: 1 --- content/usage content/api/index Code of Conduct Contributing content/license Changelog ```