Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,6 +25,16 @@ from imports_utils import fetch_all_database_pages
|
|
25 |
from imports_utils import get_property_value
|
26 |
from imports_utils import notion
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
landuse_attributes = fetch_all_database_pages(notion, landuseDatabaseId)
|
29 |
livability_attributes = fetch_all_database_pages(notion, subdomainAttributesDatabaseId)
|
30 |
|
@@ -34,8 +44,8 @@ landuseMapperDict ={}
|
|
34 |
subdomains_unique = []
|
35 |
|
36 |
for page in landuse_attributes:
|
37 |
-
value_landuse = get_property_value(page,
|
38 |
-
value_subdomain = get_property_value(page,
|
39 |
if value_subdomain and value_landuse:
|
40 |
landuseMapperDict[value_landuse] = value_subdomain
|
41 |
if value_subdomain != "":
|
@@ -48,11 +58,11 @@ attributeMapperDict ={}
|
|
48 |
domains_unique = []
|
49 |
|
50 |
for page in livability_attributes:
|
51 |
-
subdomain = get_property_value(page,
|
52 |
-
sqm_per_employee = get_property_value(page,
|
53 |
-
thresholds = get_property_value(page,
|
54 |
-
max_points = get_property_value(page,
|
55 |
-
domain = get_property_value(page,
|
56 |
if thresholds:
|
57 |
attributeMapperDict[subdomain] = {
|
58 |
'sqmPerEmpl': sqm_per_employee if sqm_per_employee != "" else 0,
|
|
|
25 |
from imports_utils import get_property_value
|
26 |
from imports_utils import notion
|
27 |
|
28 |
+
|
29 |
+
from imports_utils import landuseColumnName
|
30 |
+
from imports_utils import subdomainColumnName
|
31 |
+
from imports_utils import sqmPerEmployeeColumnName
|
32 |
+
from imports_utils import thresholdsColumnName
|
33 |
+
from imports_utils import maxPointsColumnName
|
34 |
+
from imports_utils import domainColumnName
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
landuse_attributes = fetch_all_database_pages(notion, landuseDatabaseId)
|
39 |
livability_attributes = fetch_all_database_pages(notion, subdomainAttributesDatabaseId)
|
40 |
|
|
|
44 |
subdomains_unique = []
|
45 |
|
46 |
for page in landuse_attributes:
|
47 |
+
value_landuse = get_property_value(page, landuseColumnName)
|
48 |
+
value_subdomain = get_property_value(page, subdomainColumnName)
|
49 |
if value_subdomain and value_landuse:
|
50 |
landuseMapperDict[value_landuse] = value_subdomain
|
51 |
if value_subdomain != "":
|
|
|
58 |
domains_unique = []
|
59 |
|
60 |
for page in livability_attributes:
|
61 |
+
subdomain = get_property_value(page, subdomainColumnName)
|
62 |
+
sqm_per_employee = get_property_value(page, sqmPerEmployeeColumnName)
|
63 |
+
thresholds = get_property_value(page, thresholdsColumnName)
|
64 |
+
max_points = get_property_value(page, maxPointsColumnName)
|
65 |
+
domain = get_property_value(page, domainColumnName)
|
66 |
if thresholds:
|
67 |
attributeMapperDict[subdomain] = {
|
68 |
'sqmPerEmpl': sqm_per_employee if sqm_per_employee != "" else 0,
|