Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
83de682
1
Parent(s):
b9a4efc
Update app.py
Browse files
app.py
CHANGED
@@ -120,13 +120,13 @@ lu_columns = []
|
|
120 |
for name in df_lu.columns:
|
121 |
if name.startswith("lu+"):
|
122 |
lu_columns.append(name)
|
123 |
-
df_lu_filtered = df_lu[lu_columns].loc[mask_connected]
|
124 |
|
|
|
125 |
df_lu_filtered.columns = [col.replace('lu+', '') for col in df_lu_filtered.columns]
|
126 |
df_lu_filtered.columns = [col.replace('ASSETS+', '') for col in df_lu_filtered.columns]
|
|
|
127 |
df_lu_filtered = df_lu_filtered.T.groupby(level=0).sum().T
|
128 |
|
129 |
-
df_lu_filtered = df_lu_filtered.astype(str)
|
130 |
df_lu_filtered_dict = df_lu_filtered.to_dict('index')
|
131 |
|
132 |
|
@@ -271,7 +271,7 @@ def test(input_json):
|
|
271 |
output = {
|
272 |
#"subdomainsAccessibility_dictionary": subdomainsAccessibility_dictionary,
|
273 |
#"livability_dictionary": livability_dictionary,
|
274 |
-
|
275 |
"luDomainMapper": landuseMapperDict,
|
276 |
"attributeMapper": attributeMapperDict,
|
277 |
"fetchDm": dm_dictionary,
|
|
|
120 |
for name in df_lu.columns:
|
121 |
if name.startswith("lu+"):
|
122 |
lu_columns.append(name)
|
|
|
123 |
|
124 |
+
df_lu_filtered = df_lu[lu_columns].loc[mask_connected]
|
125 |
df_lu_filtered.columns = [col.replace('lu+', '') for col in df_lu_filtered.columns]
|
126 |
df_lu_filtered.columns = [col.replace('ASSETS+', '') for col in df_lu_filtered.columns]
|
127 |
+
df_lu_filtered = df_lu_filtered.astype(int)
|
128 |
df_lu_filtered = df_lu_filtered.T.groupby(level=0).sum().T
|
129 |
|
|
|
130 |
df_lu_filtered_dict = df_lu_filtered.to_dict('index')
|
131 |
|
132 |
|
|
|
271 |
output = {
|
272 |
#"subdomainsAccessibility_dictionary": subdomainsAccessibility_dictionary,
|
273 |
#"livability_dictionary": livability_dictionary,
|
274 |
+
"subdomainsWeights_dictionary": LivabilitySubdomainsInputs_dictionary,
|
275 |
"luDomainMapper": landuseMapperDict,
|
276 |
"attributeMapper": attributeMapperDict,
|
277 |
"fetchDm": dm_dictionary,
|