classifications package
Subpackages
Submodules
classifications.core module
- class classifications.core.BonsaiTreeMaster(code, parent_code, name, level, alias_code)[source]
Bases:
object
- class classifications.core.DataPackage[source]
Bases:
object
- disaggregate_bonsai(codes_or_yaml)[source]
Disaggregates the code in the bonsai tables.
Currently only for activitytype and flowobject.
Argument
- codes_or_yaml: dict or str
A dictionary containing the disaggregation mappings or a string path to a YAML file. Example:
disaggregations: - old_code: "ai" new_codes: - code: "ai_0" description: "foo" mappings: {"nace_rev1": ["0.11", "0.12"]} - code: "ai_1" description: "" mappings: {}
- returns:
dict with updated bonsai tables
- rtype:
dict
- class classifications.core.TreeMasterFlowobject(code, parent_code, name, level, compartment, chemical_compound, default_unit, alias_code)[source]
Bases:
BonsaiTreeMaster
- classifications.core.get_bonsai_classification()[source]
Returns a dictionary of all the default bonsai classification names