Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
e8a1fdb
1
Parent(s):
c1893ae
Update app.py
Browse files
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
|
140 |
-
subdomainsAccessibility[
|
141 |
# for unweighted accessibility (e. g. points of interest)
|
142 |
else:
|
143 |
-
for
|
144 |
-
subdomainsAccessibility[
|
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 |
|