nastasiasnk commited on
Commit
0ac30f2
·
verified ·
1 Parent(s): 0f08cf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -31,35 +31,31 @@ from config import maxPointsColumnName
31
  from config import domainColumnName
32
 
33
 
34
-
35
  landuse_attributes = fetch_all_database_pages(notion, landuseDatabaseId)
36
  livability_attributes = fetch_all_database_pages(notion, subdomainAttributesDatabaseId)
37
 
38
-
39
  # fetch the dictionary with landuse - domain pairs
40
  landuseMapperDict ={}
41
  subdomains_unique = []
42
 
43
  for page in landuse_attributes:
44
- value_landuse = get_property_value(page, "LANDUSE")
45
- value_subdomain = get_property_value(page, "SUBDOMAIN_LIVABILITY")
46
  if value_subdomain and value_landuse:
47
  landuseMapperDict[value_landuse] = value_subdomain
48
  if value_subdomain != "":
49
  subdomains_unique.append(value_subdomain)
50
 
51
-
52
-
53
  # fetch the dictionary with subdomain attribute data
54
  attributeMapperDict ={}
55
  domains_unique = []
56
 
57
  for page in livability_attributes:
58
- subdomain = get_property_value(page, "SUBDOMAIN_LIVABILITY")
59
- sqm_per_employee = get_property_value(page, "SQM PER EMPL")
60
- thresholds = get_property_value(page, "MANHATTAN THRESHOLD")
61
- max_points = get_property_value(page, "LIVABILITY MAX POINT")
62
- domain = get_property_value(page, "DOMAIN_LIVABILITY")
63
  if thresholds:
64
  attributeMapperDict[subdomain] = {
65
  'sqmPerEmpl': sqm_per_employee if sqm_per_employee != "" else 0,
 
31
  from config import domainColumnName
32
 
33
 
 
34
  landuse_attributes = fetch_all_database_pages(notion, landuseDatabaseId)
35
  livability_attributes = fetch_all_database_pages(notion, subdomainAttributesDatabaseId)
36
 
 
37
  # fetch the dictionary with landuse - domain pairs
38
  landuseMapperDict ={}
39
  subdomains_unique = []
40
 
41
  for page in landuse_attributes:
42
+ value_landuse = get_property_value(page, landuseColumnName)
43
+ value_subdomain = get_property_value(page, subdomainColumnName)
44
  if value_subdomain and value_landuse:
45
  landuseMapperDict[value_landuse] = value_subdomain
46
  if value_subdomain != "":
47
  subdomains_unique.append(value_subdomain)
48
 
 
 
49
  # fetch the dictionary with subdomain attribute data
50
  attributeMapperDict ={}
51
  domains_unique = []
52
 
53
  for page in livability_attributes:
54
+ subdomain = get_property_value(page, subdomainColumnName)
55
+ sqm_per_employee = get_property_value(page, sqmPerEmployeeColumnName)
56
+ thresholds = get_property_value(page, thresholdsColumnName)
57
+ max_points = get_property_value(page, maxPointsColumnName)
58
+ domain = get_property_value(page, domainColumnName)
59
  if thresholds:
60
  attributeMapperDict[subdomain] = {
61
  'sqmPerEmpl': sqm_per_employee if sqm_per_employee != "" else 0,