Weighting

Assessment.py contains:

  • get_pathway_list(): correspond to the LCIA Evaluate pathway stage.

  • get_comparison(): correspond to the LCIA Normalisation and agregation stage.

Be careful: those function are coded to use a specific DataFrame structure. Please refer to the guide if you have a problem.

Assessment.get_pathway_list(pathways_data, LCI_table)

This function parameters are the DataFrame of both the pathways and scenario pieces of information. It returns a list of class object pathways, each pathway has their ID, value, precision… in their self parameters. Refer to Pathways.py for further understanding of the CreatePathway class.

Paramètres:
  • pathways_data (panda.DataFrame) – The pathway_data sheet, a pandas database that recap every pathways specificities, containing input and output information.

  • LCI_table (panda.DataFrame) – A panda database of the LCI of a scenario or reference.

Assessment.get_comparison(database_endpoint_impact, pathways_list, name_scenario, pathways_list_ref, error_shown)

The get_comparison function will determine the values to use in the donut graph.

Paramètres:
  • database_endpoint_impact (panda.DataFrame) – The database Graph_recap, containing the capability impact category to beshown on the graph.

  • pathways_list (list[CreatePathway]) – A list containing CreatePathway class object, representing each pathway for the scenarion. With self.value as the pathway output, self.stakeholder the group output and self.precision as the pathway precision.

  • name_scenario (str) – A python string containing the name of the scenario.

  • pathways_list_ref (list[CreatePathway]) – A list containing CreatePathway class object, representing each pathway for the reference. With self.value as the pathway output, self.stakeholder the group output and self.precision asthe pathway precision.

  • error_shown (int) – An integer between [0,3]. It indicate which precision dimension use for the errorbars. Currently, its value is forced on 0. We hope to add a button to choose its value in a next update.