mescal.regionalization

Functions

_change_location_activity(→ str)

Changes the location of a process given a ranking of preferred locations

_regionalize_activity_foreground(→ dict)

Regionalize a foreground activity according to the user ranking of locations

change_location_mapping_file(→ None)

Changes the location of a process given a mapping file

Module Contents

mescal.regionalization._change_location_activity(self, activity: str, location: str, database: str, technosphere_or_biosphere_db: mescal.database.Database, esm_tech_name: str = None, product: str = None, categories: tuple = None, activity_type: str = 'technosphere') str[source]

Changes the location of a process given a ranking of preferred locations

Parameters:
  • esm_tech_name (str) – name of the technology or resource in the ESM

  • product (str) – name of the product in the LCI database for technosphere flows

  • activity (str) – name of the activity in the LCI database

  • location (str) – initial location of the process

  • database (str) – name of the database in the Brightway project

  • activity_type (str) – type of activity, can be ‘technosphere’ or ‘biosphere’

  • categories (tuple) – name of the categories in the LCI database (for biosphere flows only)

  • technosphere_or_biosphere_db (mescal.database.Database) – technosphere or biosphere LCI database, depending on activity_type

Returns:

the highest available location within the ranking, or the initial location is any of the listed locations is available

Return type:

str

mescal.regionalization._regionalize_activity_foreground(self, act: dict) dict[source]

Regionalize a foreground activity according to the user ranking of locations

Parameters:

act (dict) – activity to regionalize

Returns:

the regionalized activity

Return type:

dict

mescal.regionalization.change_location_mapping_file(self) None[source]

Changes the location of a process given a mapping file

Returns:

None

Return type:

None