bw2regional.lca.base_class

Module Contents

Classes

RegionalizationBase

Functions

annotate_flow(flow_id, _)

get_dependent_databases(demand_dict)

Demand can be activitiy ids or tuple keys.

class bw2regional.lca.base_class.RegionalizationBase(demand, *args, **kwargs)[source]

Bases: bw2calc.lca.LCA

__geodataframe(matrix, sum_flows, annotate_flows, col_dict, used_geocollections, cutoff)[source]
_results_new_scale(matrix, flow)[source]
create_geo_transform_matrix()[source]

Get geographic transform matrix G, which gives the intersecting areas of inventory and impact assessment spatial units. Rows are inventory spatial units, and columns are impact assessment spatial units.

Uses self.inv_spatial_dict and self.ia_spatial_dict.

Returns:

Parameter array with row/col of inventory and IA locations * geo_transform_matrix: The matrix G

Return type:

  • geo_transform_params

create_inventory_mapping_matrix()[source]

Get inventory mapping matrix, M, which maps inventory activities to inventory locations. Rows are inventory activities and columns are inventory spatial units.

Uses self.technosphere_mm.row_mapper and self.databases.

Creates self.inv_mapping_mm, self.inv_mapping_matrix, and self.dicts.inv_spatial/

create_loading_matrix()[source]

Get diagonal regionalized loading matrix, L, which gives location-specific background loading factors. Dimensions are impact assessment spatial units.

Uses self.dicts.ia_spatial.

create_regionalized_characterization_matrix(row_mapper=None)[source]

Get regionalized characterization matrix, R, which gives location- and biosphere flow-specific characterization factors.

Rows are impact assessment spatial units, and columns are biosphere flows. However, we build it transverse and transpose it, as the characterization matrix indices are provided that way.

Uses self._biosphere_dict and self.method.

Returns:

Parameter array with row/col of IA locations/biosphere flows * ia_spatial_dict: Dictionary linking impact assessment locations to matrix rows * reg_cf_matrix: The matrix R

Return type:

  • reg_cf_params

geodataframe_ia_spatial_scale(sum_flows=True, annotate_flows=None, cutoff=None)[source]
geodataframe_inv_spatial_scale(sum_flows=True, annotate_flows=None, cutoff=None)[source]
geodataframe_xtable_spatial_scale(sum_flows=True, annotate_flows=None, cutoff=None)[source]
get_ia_geocollections()[source]

Retrieve the geocollections linked to the impact assessment method

get_inventory_geocollections()[source]

Get the set of all needed inventory geocollections.

Raise UnprocessedDatabase if any database is missing the required metadata.

needed_intersections()[source]

Figure out which Intersection objects are needed bsed on self.inventory_geocollections and self.ia_geocollections.

Raise MissingIntersection if an intersection is required, but not available.

abstract results_ia_spatial_scale()[source]
abstract results_inv_spatial_scale()[source]
bw2regional.lca.base_class.annotate_flow(flow_id, _)[source]
bw2regional.lca.base_class.get_dependent_databases(demand_dict)[source]

Demand can be activitiy ids or tuple keys.