Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
3698c41
1
Parent(s):
b01674f
Update app.py
Browse files
app.py
CHANGED
@@ -78,14 +78,15 @@ else:
|
|
78 |
df_lu = df_lu.set_index("ids", drop=False)
|
79 |
|
80 |
df_dm = matrices[distanceMatrixActivityNodes]
|
81 |
-
|
|
|
82 |
|
83 |
#df_dm_transport = matrices[distanceMatrixTransportStops]
|
84 |
dm_dictionary = df_dm.to_dict('index')
|
85 |
#df_dm_transport_dictionary = df_dm_transport.to_dict('index')
|
86 |
|
87 |
# filter activity nodes attributes
|
88 |
-
mask_connected =
|
89 |
lu_columns = []
|
90 |
for name in df_lu.columns:
|
91 |
if name.startswith("lu+"):
|
@@ -130,8 +131,7 @@ def test(input_json):
|
|
130 |
dfMatrix = dfMatrix.round(0).astype(int)
|
131 |
else:
|
132 |
dfLanduses = df_lu_filtered.copy()
|
133 |
-
#dfLanduses = dfLanduses.round(0).astype(int)
|
134 |
-
|
135 |
dfMatrix = df_dm.copy()
|
136 |
|
137 |
|
|
|
78 |
df_lu = df_lu.set_index("ids", drop=False)
|
79 |
|
80 |
df_dm = matrices[distanceMatrixActivityNodes]
|
81 |
+
df_dm = df_dm.apply(pd.to_numeric, errors='coerce')
|
82 |
+
df_dm = df_dm.round(0).astype(int)
|
83 |
|
84 |
#df_dm_transport = matrices[distanceMatrixTransportStops]
|
85 |
dm_dictionary = df_dm.to_dict('index')
|
86 |
#df_dm_transport_dictionary = df_dm_transport.to_dict('index')
|
87 |
|
88 |
# filter activity nodes attributes
|
89 |
+
mask_connected = dfMatrix.index.tolist()
|
90 |
lu_columns = []
|
91 |
for name in df_lu.columns:
|
92 |
if name.startswith("lu+"):
|
|
|
131 |
dfMatrix = dfMatrix.round(0).astype(int)
|
132 |
else:
|
133 |
dfLanduses = df_lu_filtered.copy()
|
134 |
+
#dfLanduses = dfLanduses.round(0).astype(int)
|
|
|
135 |
dfMatrix = df_dm.copy()
|
136 |
|
137 |
|