Impacts module#

Content#

ammonium_nitrate_impacts(amount[, ...])

Impact associated to ammonium nitrate manufacturing and usage.

superphosphate_impacts(amount[, sp_type, ...])

Impact associated to Super Phosphate manufacturing and usage, either single (SSP) or triple (TSP).

water_consumption_flush(pop, duration[, ...])

Compute water use from toilet flushes based on the urination and defecation frequencies from the excretion_frequency.csv database.

Details#

orgmatt.impacts.ammonium_nitrate_impacts(amount: Quantity, impact_type: str = 'GWP', ci: int = 0, q: list[float] | ndarray[Any, dtype[floating | int64]] | None = None) Quantity[source]#

Impact associated to ammonium nitrate manufacturing and usage.

Parameters:
  • amount (float or list-like object [mass]*[nitrogen]) – Mass of euivalent nitrogen applied.

  • impact_type (str (optional, default: "GWP")) – Impact associated, among “GWP” (global warming potential) for climate impact, “EP” for eutrophication, and “AP” for acidification potential.

  • ci (int (optional, default: 0)) – Confidence interval (CI). If non-zero, the function will also return the low and high expected values corresponding to that CI, otherwise it will only return the average value.

Returns:

impact – Expected impact if ci is 0, otherwise one (low, mean, high) value for each entry in pop, giving the expected impact: * if impact_type is “GWP”, then [X] is [carbon dioxide_equivalent] so the result will be in kgCO2e, * if impact_type is “EP”, then [X] is [phosphate_equivalent] so the result will be in kgPO4e, * if impact_type is “AP”, then [X] is [sulfur_dioxide_equivalent] so the result will be in kgSO2e.

Return type:

float or array of size 3 or (len(pop), 3) [mass]*[X]

orgmatt.impacts.superphosphate_impacts(amount: Quantity, sp_type: str = 'SSP', impact_type: str = 'GWP', ci: int = 0, q: list[float] | ndarray[Any, dtype[floating | int64]] | None = None) Quantity[source]#

Impact associated to Super Phosphate manufacturing and usage, either single (SSP) or triple (TSP).

Parameters:
  • amount (float or list-like object [mass]*[phosphorus]) – Mass of euivalent phosphorus applied.

  • sp_type (str, optional (default: "SSP")) – Type of superphosphate, either single (“SSP”) or triple (“TSP”).

  • impact_type (str (optional, default: "GWP")) – Impact associated, among “GWP” (global warming potential) for climate impact, “EP” for eutrophication, and “AP” for acidification potential.

  • ci (int (optional, default: 0)) – Confidence interval (CI). If non-zero, the function will also return the low and high expected values corresponding to that CI, otherwise it will only return the average value.

Returns:

impact – Expected impact if ci is 0, otherwise (low, mean, high) values for the expected impact: * if impact_type is “GWP”, then [X] is [carbon dioxide_equivalent] so the result will be in kgCO2e, * if impact_type is “EP”, then [X] is [phosphate_equivalent] so the result will be in kgPO4e, * if impact_type is “AP”, then [X] is [sulfur_dioxide_equivalent] so the result will be in kgSO2e.

Return type:

float or array of size 3 or (len(pop), 3) [mass]*[X]

orgmatt.impacts.water_consumption_flush(pop: float | ~numpy.ndarray[~typing.Any, ~numpy.dtype[~numpy.floating | ~numpy.int64]], duration: ~pint.registry.Quantity, avg_flush_urine: ~pint.registry.Quantity = <Quantity(3, 'liter')>, avg_flush_feces: ~pint.registry.Quantity = <Quantity(7, 'liter')>, frac_urinations: float = 1, frac_defecations: float = 1, ci: int = 0, q: list[float] | ~numpy.ndarray[~typing.Any, ~numpy.dtype[~numpy.floating | ~numpy.int64]] | None = None, **kwargs) Quantity[source]#

Compute water use from toilet flushes based on the urination and defecation frequencies from the excretion_frequency.csv database.

Parameters:
  • pop (float or list-like object) – Number of inhabitants.

  • duration (float [time]) – Time interval over water is consumed.

  • avg_flush_urine (float [length]**3 (optional, default: 3 liters)) – Average water consumption for a small flush.

  • avg_flush_feces (float [length]**3 (optional, default: 7 liters)) – Average water consumption for a large flush.

  • frac_urinations (float (default: 1)) – Fraction of urinations for which the flushes should be counted.

  • frac_defecations (float (default: 1)) – Fraction of defecations for which the flushes should be counted.

  • ci (int (optional, default: 0)) – Confidence interval (CI). If non-zero, the function will also return the low and high expected values corresponding to that CI, otherwise it will only return the average value.

  • kwargs (dict, optional) – Additional arguments can be use to restrict the results to a subset of the full database. E.g. one can add group=”senior” to return only data from senior individuals (otherwise the default is “adult”), or region=”Europe” to use only values obtained from studies in European countries.