Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
612770d
1
Parent(s):
0f28441
Update app.py
Browse files
app.py
CHANGED
@@ -47,15 +47,14 @@ from specklepy.api import operations
|
|
47 |
from specklepy.objects.geometry import Polyline, Point
|
48 |
from specklepy.objects import Base
|
49 |
|
50 |
-
import imports_utils
|
51 |
import speckle_utils
|
52 |
import data_utils
|
53 |
|
54 |
from config import landuseDatabaseId , streamId, dmBranchName, dmCommitId, luBranchName, luCommitId, distanceMatrixActivityNodes
|
55 |
from imports_utils import speckleToken
|
56 |
-
from imports_utils import fetchDistanceMatrices
|
57 |
from config import useSpeckleData
|
58 |
-
#from config import distanceMatrixTransportStops
|
59 |
from imports_utils import getDataFromSpeckle
|
60 |
|
61 |
if speckleToken is None:
|
@@ -173,13 +172,7 @@ def test(input_json):
|
|
173 |
threshold = inputs['input']["threshold"]
|
174 |
threshold = float(threshold)
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
#from imports_utils import splitDictByStrFragmentInColumnName
|
179 |
-
|
180 |
-
# create a mask based on the matrix size and ids, crop activity nodes to the mask
|
181 |
-
#mask_connected = dfMatrix.index.tolist()
|
182 |
-
|
183 |
valid_indexes = [idx for idx in mask_connected if idx in dfLanduses.index]
|
184 |
# Identify and report missing indexes
|
185 |
missing_indexes = set(mask_connected) - set(valid_indexes)
|
@@ -217,13 +210,8 @@ def test(input_json):
|
|
217 |
|
218 |
#AccessibilityInputs = pd.concat([subdomainsAccessibility, artAccessibility,gmtAccessibility], axis=1)
|
219 |
|
220 |
-
|
221 |
-
#if 'jobs' not in subdomainsAccessibility.columns:
|
222 |
-
# print("Error: Column 'jobs' does not exist in the subdomainsAccessibility.")
|
223 |
-
|
224 |
livability = accessibilityToLivability(dfMatrix,subdomainsAccessibility,livabilityMapperDict,domainsUnique)
|
225 |
|
226 |
-
|
227 |
livability_dictionary = livability.to_dict('index')
|
228 |
LivabilitySubdomainsInputs_dictionary = LivabilitySubdomainsInputs.to_dict('index')
|
229 |
subdomainsAccessibility_dictionary = subdomainsAccessibility.to_dict('index')
|
|
|
47 |
from specklepy.objects.geometry import Polyline, Point
|
48 |
from specklepy.objects import Base
|
49 |
|
50 |
+
#import imports_utils
|
51 |
import speckle_utils
|
52 |
import data_utils
|
53 |
|
54 |
from config import landuseDatabaseId , streamId, dmBranchName, dmCommitId, luBranchName, luCommitId, distanceMatrixActivityNodes
|
55 |
from imports_utils import speckleToken
|
56 |
+
#from imports_utils import fetchDistanceMatrices
|
57 |
from config import useSpeckleData
|
|
|
58 |
from imports_utils import getDataFromSpeckle
|
59 |
|
60 |
if speckleToken is None:
|
|
|
172 |
threshold = inputs['input']["threshold"]
|
173 |
threshold = float(threshold)
|
174 |
|
175 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
valid_indexes = [idx for idx in mask_connected if idx in dfLanduses.index]
|
177 |
# Identify and report missing indexes
|
178 |
missing_indexes = set(mask_connected) - set(valid_indexes)
|
|
|
210 |
|
211 |
#AccessibilityInputs = pd.concat([subdomainsAccessibility, artAccessibility,gmtAccessibility], axis=1)
|
212 |
|
|
|
|
|
|
|
|
|
213 |
livability = accessibilityToLivability(dfMatrix,subdomainsAccessibility,livabilityMapperDict,domainsUnique)
|
214 |
|
|
|
215 |
livability_dictionary = livability.to_dict('index')
|
216 |
LivabilitySubdomainsInputs_dictionary = LivabilitySubdomainsInputs.to_dict('index')
|
217 |
subdomainsAccessibility_dictionary = subdomainsAccessibility.to_dict('index')
|