Module trase.tools.pcs.supply_chains.transform
Functions to transform supply chains objects.
Functions
def add_biome(supply_chain, region_role=None)-
Insert biome nodes to paths of supply chain at position 0 or 1. :param supply_chain: supply chain :type supply_chain: pcs.supply_chains.supply_chains.SupplyChain :param autocommit: Commit to database :type autocommit: boolean
def add_country_of_production(supply_chain)def add_economic_bloc(supply_chain)def add_supply_chain_parent_region(supply_chain, child_role, parent_region_role, parent_region_level_name)def fix_supply_chain_traders(supply_chain, random=True)def remove_domestic_consumption(supply_chain)def remove_supply_chain_labels(supply_chain)def remove_supply_chain_nodes_by_role(supply_chain, roles: List[str])-
Chops the nodes out of a supply chain.
:param supply_chain:
SupplyChainobject :param roles: names of roles to be removed from supply chain :param cur: psycopg2.cursor :return SupplyChain: