Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
1d7b3b4
1
Parent(s):
de83467
Update app.py
Browse files
app.py
CHANGED
@@ -248,19 +248,21 @@ def test(input_json):
|
|
248 |
livability_score = remap(subdomainsAccessibility['jobs'], 0, threshold, 0, max_livability)
|
249 |
livability.loc[subdomainsAccessibility['jobs'] >= threshold, domains[0]] = max_livability
|
250 |
livability.loc[subdomainsAccessibility['jobs'] < threshold, domains[0]] = livability_score
|
|
|
|
|
251 |
for value in subdomainsAccessibility['jobs']:
|
252 |
if value >= threshold:
|
253 |
templist.append(max_livability)
|
254 |
else:
|
255 |
templist.append(livability_score)
|
256 |
#livability = livability.rename(columns={'jobs': 'Workplaces'})
|
257 |
-
|
258 |
-
return
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
-
livability
|
264 |
|
265 |
|
266 |
livability_dictionary = livability.to_dict('index')
|
@@ -273,8 +275,7 @@ def test(input_json):
|
|
273 |
"livability_dictionary": livability_dictionary,
|
274 |
"subdomainsWeights_dictionary": LivabilitySubdomainsInputs_dictionary,
|
275 |
"luDomainMapper": landuseMapperDict,
|
276 |
-
"attributeMapper": attributeMapperDict
|
277 |
-
"workplaces":templist
|
278 |
}
|
279 |
|
280 |
|
|
|
248 |
livability_score = remap(subdomainsAccessibility['jobs'], 0, threshold, 0, max_livability)
|
249 |
livability.loc[subdomainsAccessibility['jobs'] >= threshold, domains[0]] = max_livability
|
250 |
livability.loc[subdomainsAccessibility['jobs'] < threshold, domains[0]] = livability_score
|
251 |
+
|
252 |
+
"""
|
253 |
for value in subdomainsAccessibility['jobs']:
|
254 |
if value >= threshold:
|
255 |
templist.append(max_livability)
|
256 |
else:
|
257 |
templist.append(livability_score)
|
258 |
#livability = livability.rename(columns={'jobs': 'Workplaces'})
|
259 |
+
"""
|
260 |
+
return livability
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
+
livability = accessibilityToLivability(df_matrix,subdomainsAccessibility,attributeMapperDict,domainsUnique)
|
266 |
|
267 |
|
268 |
livability_dictionary = livability.to_dict('index')
|
|
|
275 |
"livability_dictionary": livability_dictionary,
|
276 |
"subdomainsWeights_dictionary": LivabilitySubdomainsInputs_dictionary,
|
277 |
"luDomainMapper": landuseMapperDict,
|
278 |
+
"attributeMapper": attributeMapperDict
|
|
|
279 |
}
|
280 |
|
281 |
|