Formula
score = (x) -> if x == "Yes" 10 else 0 redistributed_weights = (weights, values) -> num_of_weighted_values = weights.length for value, index in values if value == "Not Applicable" num_of_weighted_values -= 1 redistributed_weight_value = weights[index] for weight, i in weights if weight == 0 continue weights[i] = weight + redistributed_weight_value/num_of_weighted_values weights[index] = 0 weights weights = (1/6 for i in [0...6]) hazardous_substances_and_waste = [reduction_evidence, phase_out_targets, svhc, waste_reduction_evidence, waste_reduction_targets, waste_reporting] redistributed_weights(weights, hazardous_substances_and_waste) weights.reduce((weighted_sum, weight, index) -> weighted_sum + weight*score(hazardous_substances_and_waste[index]) , 0)
World Benchmarking Alliance
reduction_evidence
2022
World Benchmarking Alliance
phase_out_targets
2022
World Benchmarking Alliance
svhc
2022
World Benchmarking Alliance
waste_reduction_evidence
2022
World Benchmarking Alliance
waste_reduction_targets
2022