Agri-Food module#

This module deals with food-related matter. This is only for households at the moment but will be extended to include agricultural parcels in the future.

Content#

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

Amount of biowaste generated in households for a given population pop over a certain duration using the food.csv database.

nutrient_intake(pop, duration, nutrient[, ci])

Compute the amount of nutrient ingested by a given population over a certain duration using the food.csv database.

protein_to_nitrogen(protein_mass[, food_type])

Calculate the amount of nitrogen associated to a mass of protein based on Jones' factors (simply 6.25 for now).

Details#

orgmatt.agrifood.biowaste_from_population(pop: float | Collection, duration: Quantity, ci: int = 0, waste_type: str = 'BiodegradableWaste', **kwargs) Quantity[source]#

Amount of biowaste generated in households for a given population pop over a certain duration using the food.csv database.

Can be:

  • biodegradable waste (for any putrescible matter)

  • green waste (from gardens, etc)

  • kitchen waste (for organic components thrown during meal preparation)

  • food waste (for edible leftovers)

  • food residues (combining kitchen and food waste)

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

  • duration (float [time]) – Time interval over which the nitrogen is excreted.

  • 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.

  • waste_type (str, optional (default: "BiodegradableWaste")) – Type of waste that should be considered among “BiodegradableWaste”, “KitchenWaste”, and “FoodWaste”.

  • **kwargs (arguments to use a subset of the database) – Additional arguments can be use to restrict the results to a subset of the full database. E.g. one can add region=”Europe” to use only values obtained from studies in European countries.

Returns:

biowaste – Mass of generated biodegradable waste if ci is 0, otherwise one (low, mean, high) result per pop entry, giving the expected masses for the requested confidence interval.

Return type:

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

orgmatt.agrifood.nutrient_intake(pop: float | Collection, duration, nutrient: str, ci: int = 0, **kwargs)[source]#

Compute the amount of nutrient ingested by a given population over a certain duration using the food.csv database.

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

  • duration (float [time]) – Time interval over which the nitrogen is excreted.

  • nutrient (str) – Nutrient of interest among (‘N’, ‘K’, ‘P’, ‘Mg’, ‘Ca’).

  • 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.

  • **kwargs (arguments to use a subset of the database) – Additional arguments can be use to restrict the results to a subset of the full database. E.g. one can add excreta=”feces” to return only nitrogen contained in feces, or region=”Europe” to use only values obtained from studies in European countries.

Returns:

nutrient_mass – Mean mass of excreted nitrogen if ci is 0, otherwise one (low, mean, high) result per pop entry, giving the expected masses for the requested confidence interval.

Return type:

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

Notes

  • Nitrogen results are computed from protein data via protein_to_nitrogen() using the default value.

  • By default, only values for adults are returned, use group or age to select a specific subpopulation.

orgmatt.agrifood.protein_to_nitrogen(protein_mass: Quantity, food_type: str | None = None) Quantity[source]#

Calculate the amount of nitrogen associated to a mass of protein based on Jones’ factors (simply 6.25 for now).

Parameters:
  • protein_mass (float [mass]) – Mass of protein to convert to nitrogen content.

  • food_type (str, optional (default: average conversion factor)) – Type of food considered, among: ‘dairy’, ‘meat’ (including fish and eggs), ‘cereal’ (except corn), ‘corn’, ‘soy’, ‘legume’ (except soy), and ‘vegetable’ (including mushrooms). Currently unused, a 6.25 conversion factor is used for all food types.