nastasiasnk commited on
Commit
9125b7b
1 Parent(s): 17b4ded

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -171,8 +171,8 @@ def test(input_json):
171
 
172
  for key, values in SubdomainAttributeDict.items():
173
  if key == 'commercial':
174
- threshold = float(SubdomainAttributeDict['commercial'][1])
175
- max_livability = float(SubdomainAttributeDict['commercial'][2])
176
  livability_score = remap(subdomainsAccessibility['jobs'], 0, threshold, 0, max_livability)
177
  livability.loc[subdomainsAccessibility['jobs'] >= threshold, 'Workplaces'] = max_livability
178
  livability.loc[subdomainsAccessibility['jobs'] < threshold, 'Workplaces'] = livability_score
 
171
 
172
  for key, values in SubdomainAttributeDict.items():
173
  if key == 'commercial':
174
+ threshold = float(SubdomainAttributeDict['commercial']['thresholds'])
175
+ max_livability = float(SubdomainAttributeDict['commercial']['max_points'])
176
  livability_score = remap(subdomainsAccessibility['jobs'], 0, threshold, 0, max_livability)
177
  livability.loc[subdomainsAccessibility['jobs'] >= threshold, 'Workplaces'] = max_livability
178
  livability.loc[subdomainsAccessibility['jobs'] < threshold, 'Workplaces'] = livability_score