nastasiasnk commited on
Commit
850974d
1 Parent(s): 9c17797

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -99,11 +99,11 @@ def test(input_json):
99
  def landusesToSubdomains(DistanceMatrix, LanduseDf, LanduseToSubdomainDict, UniqueSubdomainsList):
100
  df_LivabilitySubdomainsArea = pd.DataFrame(0, index=DistanceMatrix.index, columns=UniqueSubdomainsList)
101
 
102
- for domain in UniqueSubdomainsList:
103
- for lu, lu_domain in LanduseToSubdomainDict.items():
104
- if lu_domain == domain:
105
  if lu in LanduseDf.columns:
106
- df_LivabilitySubdomainsArea[domain] = df_LivabilitySubdomainsArea[domain].add(LanduseDf[lu], fill_value=0)
107
  else:
108
  print(f"Warning: Column '{lu}' not found in landuse database")
109
 
 
99
  def landusesToSubdomains(DistanceMatrix, LanduseDf, LanduseToSubdomainDict, UniqueSubdomainsList):
100
  df_LivabilitySubdomainsArea = pd.DataFrame(0, index=DistanceMatrix.index, columns=UniqueSubdomainsList)
101
 
102
+ for subdomain in UniqueSubdomainsList:
103
+ for lu, lu_subdomain in LanduseToSubdomainDict.items():
104
+ if lu_subdomain == subdomain:
105
  if lu in LanduseDf.columns:
106
+ df_LivabilitySubdomainsArea[subdomain] = df_LivabilitySubdomainsArea[subdomain].add(LanduseDf[lu], fill_value=0)
107
  else:
108
  print(f"Warning: Column '{lu}' not found in landuse database")
109