Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
df92571
1
Parent(s):
119aa8f
Update imports_utils.py
Browse files- imports_utils.py +4 -4
imports_utils.py
CHANGED
@@ -228,14 +228,14 @@ def landusesToSubdomains(DistanceMatrix, LanduseDf, LanduseToSubdomainDict, Uniq
|
|
228 |
return df_LivabilitySubdomainsArea
|
229 |
|
230 |
|
231 |
-
def FindWorkplacesNumber (DistanceMatrix,
|
232 |
|
233 |
df_LivabilitySubdomainsWorkplaces = pd.DataFrame(0, index=DistanceMatrix.index, columns=['jobs'])
|
234 |
|
235 |
for subdomain in UniqueSubdomainsList:
|
236 |
-
for key,
|
237 |
-
if
|
238 |
-
sqm_per_empl = float(
|
239 |
if key in destinationWeights.columns and key == subdomain:
|
240 |
if sqm_per_empl > 0:
|
241 |
df_LivabilitySubdomainsWorkplaces['jobs'] += (round(destinationWeights[key] / sqm_per_empl,2)).fillna(0)
|
|
|
228 |
return df_LivabilitySubdomainsArea
|
229 |
|
230 |
|
231 |
+
def FindWorkplacesNumber (DistanceMatrix,livabilityMapperDict,destinationWeights,UniqueSubdomainsList ):
|
232 |
|
233 |
df_LivabilitySubdomainsWorkplaces = pd.DataFrame(0, index=DistanceMatrix.index, columns=['jobs'])
|
234 |
|
235 |
for subdomain in UniqueSubdomainsList:
|
236 |
+
for key, values in livabilityMapperDict.items():
|
237 |
+
if key and values['sqmPerEmpl']:
|
238 |
+
sqm_per_empl = float(livabilityMapperDict[subdomain]['sqmPerEmpl'])
|
239 |
if key in destinationWeights.columns and key == subdomain:
|
240 |
if sqm_per_empl > 0:
|
241 |
df_LivabilitySubdomainsWorkplaces['jobs'] += (round(destinationWeights[key] / sqm_per_empl,2)).fillna(0)
|