Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
4c1bd82
1
Parent(s):
8d439a2
Update app.py
Browse files
app.py
CHANGED
@@ -98,27 +98,6 @@ def test(input_json):
|
|
98 |
df_landuses = df_landuses.round(0).astype(int)
|
99 |
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
"""
|
104 |
-
# List containing the substrings to check against
|
105 |
-
tranportModes = ["DRT", "GMT", "HSR"]
|
106 |
-
|
107 |
-
# Initialize a dictionary to hold the categorized sub-dictionaries
|
108 |
-
result_dict = {mode: {} for mode in tranportModes}
|
109 |
-
|
110 |
-
# Iterate over the original dictionary to split into sub-dictionaries based on substrings
|
111 |
-
for key, value in transport_matrix.items():
|
112 |
-
for mode in tranportModes:
|
113 |
-
if mode in key: # Check if the substring is in the dictionary key
|
114 |
-
result_dict[substring][key] = value
|
115 |
-
|
116 |
-
art = result_dict["DRT"]
|
117 |
-
|
118 |
-
df_art_matrix = pd.DataFrame(art).T
|
119 |
-
df_art_matrix = df_art_matrix.round(0).astype(int)
|
120 |
-
"""
|
121 |
-
|
122 |
# create a mask based on the matrix size and ids, crop activity nodes to the mask
|
123 |
mask_connected = df_matrix.index.tolist()
|
124 |
|
@@ -285,7 +264,6 @@ def test(input_json):
|
|
285 |
LivabilitySubdomainsInputs_dictionary = LivabilitySubdomainsInputs.to_dict('index')
|
286 |
subdomainsAccessibility_dictionary = subdomainsAccessibility.to_dict('index')
|
287 |
|
288 |
-
df_art_matrix_dict = df_art_matrix.to_dict('index')
|
289 |
|
290 |
# Prepare the output
|
291 |
output = {
|
|
|
98 |
df_landuses = df_landuses.round(0).astype(int)
|
99 |
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
# create a mask based on the matrix size and ids, crop activity nodes to the mask
|
102 |
mask_connected = df_matrix.index.tolist()
|
103 |
|
|
|
264 |
LivabilitySubdomainsInputs_dictionary = LivabilitySubdomainsInputs.to_dict('index')
|
265 |
subdomainsAccessibility_dictionary = subdomainsAccessibility.to_dict('index')
|
266 |
|
|
|
267 |
|
268 |
# Prepare the output
|
269 |
output = {
|