From ebf3c38de21437d9dbc94b51b389f7cc705ecb5a Mon Sep 17 00:00:00 2001 From: RujitRaval Date: Wed, 28 Aug 2019 16:18:08 -0400 Subject: [PATCH] Disabled open data from calculation --- bpeng/pna/score_calculation.py | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/bpeng/pna/score_calculation.py b/bpeng/pna/score_calculation.py index 8b58ca0..c4266d2 100644 --- a/bpeng/pna/score_calculation.py +++ b/bpeng/pna/score_calculation.py @@ -9,29 +9,29 @@ def calculate_score_weight(weight_list, details_list): index = weight_list[i][0]-1 score_weight[index] += weight_list[i][1] - heating_violations_score = [0, 1, 3, 5] - num = [0, 1, 3, 11] - for i in range(len(num)): - initial_value = heating_violations_score[i] - if not i == len(num)-1 and details_list['num_of_heating_violations'] < num[i+1]: - break - score_weight[0] += initial_value - - dob_violations_score = [5, 4, 3, 4, 5] - num = [0, 1, 4, 20, 100] - for i in range(len(num)): - initial_value = dob_violations_score[i] - if not i == len(num)-1 and details_list['num_of_dob_violations'] < num[i+1]: - break - score_weight[3] += initial_value - - ownership_scores = { - 'Single': 3, - 'LLC': 5, - 'Corporate': 5, - 'Non-Profit': 3 - } - score_weight[3] += ownership_scores[details_list['legal_ownership']] + # heating_violations_score = [0, 1, 3, 5] + # num = [0, 1, 3, 11] + # for i in range(len(num)): + # initial_value = heating_violations_score[i] + # if not i == len(num)-1 and details_list['num_of_heating_violations'] < num[i+1]: + # break + # score_weight[0] += initial_value + + # dob_violations_score = [5, 4, 3, 4, 5] + # num = [0, 1, 4, 20, 100] + # for i in range(len(num)): + # initial_value = dob_violations_score[i] + # if not i == len(num)-1 and details_list['num_of_dob_violations'] < num[i+1]: + # break + # score_weight[3] += initial_value + + # ownership_scores = { + # 'Single': 3, + # 'LLC': 5, + # 'Corporate': 5, + # 'Non-Profit': 3 + # } + # score_weight[3] += ownership_scores[details_list['legal_ownership']] for index in range(len(score_weight)): final_criteria_scores.append((index+1, score_weight[index])) -- GitLab