nastasiasnk commited on
Commit
e8a1fdb
1 Parent(s): c1893ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -136,12 +136,12 @@ def test(input_json):
136
  subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=destinationWeights.columns)
137
  # for weighted accessibility (e. g. areas)
138
  if not destinationWeights.empty:
139
- for col,columnName in zip(destinationWeights.columns, weightsNames):
140
- subdomainsAccessibility[columnName] = (decay_factors * destinationWeights[col].values).sum(axis=1)
141
  # for unweighted accessibility (e. g. points of interest)
142
  else:
143
- for columnName in weightsNames:
144
- subdomainsAccessibility[columnName] = (decay_factors * 1).sum(axis=1)
145
 
146
  return subdomainsAccessibility
147
 
 
136
  subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=destinationWeights.columns)
137
  # for weighted accessibility (e. g. areas)
138
  if not destinationWeights.empty:
139
+ for col in destinationWeights.columns:
140
+ subdomainsAccessibility[col] = (decay_factors * destinationWeights[col].values).sum(axis=1)
141
  # for unweighted accessibility (e. g. points of interest)
142
  else:
143
+ for col in DistanceMatrix.columns:
144
+ subdomainsAccessibility[col] = (decay_factors * 1).sum(axis=1)
145
 
146
  return subdomainsAccessibility
147