nastasiasnk commited on
Commit
5e6d982
1 Parent(s): 2b97bb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -119,10 +119,6 @@ def test(input_json):
119
  df_art_matrix = pd.DataFrame(art).T
120
  df_art_matrix = df_art_matrix.round(0).astype(int)
121
 
122
- """
123
- if df_art_matrix.empty():
124
- print("transport matrix is empty")
125
- """
126
 
127
  # create a mask based on the matrix size and ids, crop activity nodes to the mask
128
  mask_connected = df_matrix.index.tolist()
@@ -230,9 +226,9 @@ def test(input_json):
230
  return subdomainsAccessibility
231
 
232
  subdomainsAccessibility = computeAccessibility(df_matrix,LivabilitySubdomainsInputs,alpha,threshold)
233
- transportAccessibility = computeAccessibility(df_art_matrix,None,alpha,threshold)
234
 
235
- AccessibilityInputs = pd.concat([subdomainsAccessibility, transportAccessibility], axis=1)
236
 
237
 
238
 
@@ -283,12 +279,12 @@ def test(input_json):
283
 
284
 
285
 
286
- livability = accessibilityToLivability(df_matrix,AccessibilityInputs,attributeMapperDict,domainsUnique)
287
 
288
 
289
  livability_dictionary = livability.to_dict('index')
290
  LivabilitySubdomainsInputs_dictionary = LivabilitySubdomainsInputs.to_dict('index')
291
- subdomainsAccessibility_dictionary = AccessibilityInputs.to_dict('index')
292
 
293
  df_art_matrix_dict = df_art_matrix.to_dict('index')
294
 
 
119
  df_art_matrix = pd.DataFrame(art).T
120
  df_art_matrix = df_art_matrix.round(0).astype(int)
121
 
 
 
 
 
122
 
123
  # create a mask based on the matrix size and ids, crop activity nodes to the mask
124
  mask_connected = df_matrix.index.tolist()
 
226
  return subdomainsAccessibility
227
 
228
  subdomainsAccessibility = computeAccessibility(df_matrix,LivabilitySubdomainsInputs,alpha,threshold)
229
+ #transportAccessibility = computeAccessibility(df_art_matrix,None,alpha,threshold)
230
 
231
+ #AccessibilityInputs = pd.concat([subdomainsAccessibility, transportAccessibility], axis=1)
232
 
233
 
234
 
 
279
 
280
 
281
 
282
+ livability = accessibilityToLivability(df_matrix,subdomainsAccessibility,attributeMapperDict,domainsUnique)
283
 
284
 
285
  livability_dictionary = livability.to_dict('index')
286
  LivabilitySubdomainsInputs_dictionary = LivabilitySubdomainsInputs.to_dict('index')
287
+ subdomainsAccessibility_dictionary = subdomainsAccessibility.to_dict('index')
288
 
289
  df_art_matrix_dict = df_art_matrix.to_dict('index')
290