nastasiasnk commited on
Commit
d887ceb
1 Parent(s): 2614bf8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -215,12 +215,13 @@ def test(input_json):
215
 
216
  # for weighted accessibility (e. g. areas)
217
  if not destinationWeights.empty:
218
- subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=destinationWeights.columns)
219
  for col in destinationWeights.columns:
220
  subdomainsAccessibility[col] = (decay_factors * destinationWeights[col].values).sum(axis=1)
221
  # for unweighted accessibility (e. g. points of interest)
222
  else:
223
- for col in DistanceMatrix.columns:
 
224
  subdomainsAccessibility[col] = (decay_factors * 1).sum(axis=1)
225
 
226
  return subdomainsAccessibility
 
215
 
216
  # for weighted accessibility (e. g. areas)
217
  if not destinationWeights.empty:
218
+ subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=destinationWeights.columns)
219
  for col in destinationWeights.columns:
220
  subdomainsAccessibility[col] = (decay_factors * destinationWeights[col].values).sum(axis=1)
221
  # for unweighted accessibility (e. g. points of interest)
222
  else:
223
+ subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns='ART')
224
+ for col in subdomainsAccessibility.columns:
225
  subdomainsAccessibility[col] = (decay_factors * 1).sum(axis=1)
226
 
227
  return subdomainsAccessibility