hkayabilisim commited on
Commit
af198e5
·
1 Parent(s): 4408461

Added new policies

Browse files
tomorrowcities/backend/engine.py CHANGED
@@ -127,6 +127,8 @@ def compute_power_infra(nodes,edges,intensity,fragility):
127
 
128
  def compute(gdf_landuse, gdf_buildings, df_household, df_individual,gdf_intensity, df_hazard, hazard_type, policies=[]):
129
 
 
 
130
  column_names = {'zoneID':'zoneid','bldID':'bldid','nHouse':'nhouse',
131
  'specialFac':'specialfac','expStr':'expstr','repValue':'repvalue',
132
  'xCoord':'xcoord','yCoord':'ycoord','hhID':'hhid','nInd':'nind',
@@ -177,6 +179,8 @@ def compute(gdf_landuse, gdf_buildings, df_household, df_individual,gdf_intensit
177
 
178
  gdf_building_intensity = gdf_building_intensity.merge(gdf_landuse[['zoneid','avgincome']],on='zoneid',how='left')
179
 
 
 
180
  # TODO: Check if the logic makes sense
181
  if hazard_type == HAZARD_FLOOD:
182
  away_from_flood = gdf_building_intensity['distance'] > threshold_flood_distance
@@ -186,17 +190,109 @@ def compute(gdf_landuse, gdf_buildings, df_household, df_individual,gdf_intensit
186
  gdf_building_intensity[['material','code_level','storeys','occupancy']] = \
187
  gdf_building_intensity['expstr'].str.split('+',expand=True)
188
  gdf_building_intensity['height'] = gdf_building_intensity['storeys'].str.extract(r'([0-9]+)s').astype('int')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  lr = (gdf_building_intensity['height'] <= 4)
190
  mr = (gdf_building_intensity['height'] >= 5) & (gdf_building_intensity['height'] <= 8)
191
  hr = (gdf_building_intensity['height'] >= 9)
192
  gdf_building_intensity.loc[lr, 'height_level'] = 'LR'
193
  gdf_building_intensity.loc[mr, 'height_level'] = 'MR'
194
  gdf_building_intensity.loc[hr, 'height_level'] = 'HR'
 
195
  # Earthquake uses simplified taxonomy
196
  gdf_building_intensity['vulnstreq'] = \
197
  gdf_building_intensity[['material','code_level','height_level']] \
198
  .agg('+'.join,axis=1)
199
- #
 
 
 
 
 
200
  if hazard_type == HAZARD_EARTHQUAKE:
201
  bld_eq = gdf_building_intensity.merge(df_hazard, left_on='vulnstreq',right_on='expstr', how='left')
202
  nulls = bld_eq['muds1_g'].isna()
@@ -213,12 +309,6 @@ def compute(gdf_landuse, gdf_buildings, df_household, df_individual,gdf_intensit
213
  bld_eq[f'ds_{i}'] = np.abs(bld_eq[f'prob_ds{i-1}'] - bld_eq[f'prob_ds{i}'])
214
  df_ds = bld_eq[['ds_1','ds_2','ds_3','ds_4','ds_5']]
215
  bld_eq['eq_ds'] = df_ds.idxmax(axis='columns').str.extract(r'ds_([0-9]+)').astype('int') - 1
216
-
217
- if 1 in policies:
218
- bld_eq.loc[bld_eq['occupancy'] == 'Res', 'eq_ds'] = 0
219
- if 2 in policies:
220
- bld_eq.loc[bld_eq['avgincome'] == 'lowIncomeA', 'eq_ds'] = 0
221
- bld_eq.loc[bld_eq['avgincome'] == 'lowIncomeB', 'eq_ds'] = 0
222
  # Create a simplified building-hazard relation
223
  bld_hazard = bld_eq[['bldid','eq_ds']]
224
  bld_hazard = bld_hazard.rename(columns={'eq_ds':'ds'})
@@ -235,11 +325,6 @@ def compute(gdf_landuse, gdf_buildings, df_household, df_individual,gdf_intensit
235
  bld_flood['fl_prob'] = np.diag(flood_mapping(xnew))
236
  bld_flood['fl_ds'] = 0
237
  bld_flood.loc[bld_flood['fl_prob'] > threshold_flood,'fl_ds'] = 1
238
- if 1 in policies:
239
- bld_flood.loc[bld_flood['occupancy'] == 'Res', 'fl_ds'] = 0
240
- if 2 in policies:
241
- bld_flood.loc[bld_flood['avgincome'] == 'lowIncomeA', 'fl_ds'] = 0
242
- bld_flood.loc[bld_flood['avgincome'] == 'lowIncomeB', 'fl_ds'] = 0
243
  # Create a simplified building-hazard relation
244
  bld_hazard = bld_flood[['bldid','fl_ds']]
245
  bld_hazard = bld_hazard.rename(columns={'fl_ds':'ds'})
 
127
 
128
  def compute(gdf_landuse, gdf_buildings, df_household, df_individual,gdf_intensity, df_hazard, hazard_type, policies=[]):
129
 
130
+ np.random.seed(seed=0)
131
+
132
  column_names = {'zoneID':'zoneid','bldID':'bldid','nHouse':'nhouse',
133
  'specialFac':'specialfac','expStr':'expstr','repValue':'repvalue',
134
  'xCoord':'xcoord','yCoord':'ycoord','hhID':'hhid','nInd':'nind',
 
179
 
180
  gdf_building_intensity = gdf_building_intensity.merge(gdf_landuse[['zoneid','avgincome']],on='zoneid',how='left')
181
 
182
+ gdf_building_intensity['rnd'] = np.random.random((len(gdf_building_intensity),1))
183
+
184
  # TODO: Check if the logic makes sense
185
  if hazard_type == HAZARD_FLOOD:
186
  away_from_flood = gdf_building_intensity['distance'] > threshold_flood_distance
 
190
  gdf_building_intensity[['material','code_level','storeys','occupancy']] = \
191
  gdf_building_intensity['expstr'].str.split('+',expand=True)
192
  gdf_building_intensity['height'] = gdf_building_intensity['storeys'].str.extract(r'([0-9]+)s').astype('int')
193
+
194
+
195
+ if 1 in policies:
196
+ # First, mid-code -> high-code
197
+ # then, low-code -> mid-code
198
+ gdf_building_intensity.loc[(gdf_building_intensity['occupancy'] == 'Res') & (gdf_building_intensity['code_level'] == 'MC'), 'code_level'] = 'HC'
199
+ gdf_building_intensity.loc[(gdf_building_intensity['occupancy'] == 'Res') & (gdf_building_intensity['code_level'] == 'LC'), 'code_level'] = 'MC'
200
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
201
+ max_height = gdf_building_intensity['height'].max()
202
+ idx = gdf_building_intensity['occupancy'] == 'Res'
203
+ gdf_building_intensity.loc[idx, 'height'] = gdf_building_intensity[idx]['height'].apply(lambda h: min(max_height, h+2))
204
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
205
+
206
+ if 2 in policies:
207
+ # First, mid-code -> high-code
208
+ # then, low-code -> mid-code
209
+ gdf_building_intensity.loc[((gdf_building_intensity['avgincome'] == 'lowIncomeA') | (gdf_building_intensity['avgincome'] == 'lowIncomeA')) & (gdf_building_intensity['code_level'] == 'MC'), 'code_level'] = 'HC'
210
+ gdf_building_intensity.loc[((gdf_building_intensity['avgincome'] == 'lowIncomeA') | (gdf_building_intensity['avgincome'] == 'lowIncomeA')) & (gdf_building_intensity['code_level'] == 'LC'), 'code_level'] = 'MC'
211
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
212
+ max_height = gdf_building_intensity['height'].max()
213
+ idx = (gdf_building_intensity['avgincome'] == 'lowIncomeA') | (gdf_building_intensity['avgincome'] == 'lowIncomeA')
214
+ gdf_building_intensity.loc[idx, 'height'] = gdf_building_intensity[idx]['height'].apply(lambda h: min(max_height, h+4))
215
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
216
+
217
+ if 3 in policies:
218
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
219
+ max_height = gdf_building_intensity['height'].max()
220
+ gdf_building_intensity.loc[:, 'height'] = gdf_building_intensity['height'].apply(lambda h: min(max_height, h+6))
221
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
222
+
223
+ if 4 in policies:
224
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
225
+ max_height = gdf_building_intensity['height'].max()
226
+ idx = gdf_building_intensity['specialfac'] != 0
227
+ gdf_building_intensity.loc[idx, 'height'] = gdf_building_intensity[idx]['height'].apply(lambda h: min(max_height, h+4))
228
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
229
+
230
+ if 5 in policies:
231
+ # First, mid-code -> high-code
232
+ # then, low-code -> mid-code
233
+ idx = ((gdf_building_intensity['avgincome'] == 'lowIncomeA') |\
234
+ (gdf_building_intensity['avgincome'] == 'lowIncomeA') &\
235
+ (gdf_building_intensity['specialfac'] == 0))
236
+ gdf_building_intensity.loc[idx & (gdf_building_intensity['code_level'] == 'MC'), 'code_level'] = 'HC'
237
+ gdf_building_intensity.loc[idx & (gdf_building_intensity['code_level'] == 'LC'), 'code_level'] = 'MC'
238
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
239
+ max_height = gdf_building_intensity['height'].max()
240
+ gdf_building_intensity.loc[idx, 'height'] = gdf_building_intensity[idx]['height'].apply(lambda h: min(max_height, h+1))
241
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
242
+
243
+ if 6 in policies:
244
+ # First, mid-code -> high-code
245
+ # then, low-code -> mid-code
246
+ idx = ((gdf_building_intensity['avgincome'] == 'lowIncomeA') |\
247
+ (gdf_building_intensity['avgincome'] == 'lowIncomeA') &\
248
+ (gdf_building_intensity['specialfac'] != 0))
249
+ gdf_building_intensity.loc[idx & (gdf_building_intensity['code_level'] == 'MC'), 'code_level'] = 'HC'
250
+ gdf_building_intensity.loc[idx & (gdf_building_intensity['code_level'] == 'LC'), 'code_level'] = 'MC'
251
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
252
+ max_height = gdf_building_intensity['height'].max()
253
+ gdf_building_intensity.loc[idx, 'height'] = gdf_building_intensity[idx]['height'].apply(lambda h: min(max_height, h+1))
254
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
255
+
256
+ if 7 in policies:
257
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
258
+ idx = (gdf_building_intensity['rnd'] < 0.70) & (gdf_building_intensity['occupancy'] == 'Res')
259
+ gdf_building_intensity.loc[idx,'occupancy'] = 'Agri'
260
+
261
+ if 8 in policies:
262
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
263
+ max_height = gdf_building_intensity['height'].max()
264
+ idx = gdf_building_intensity['specialfac'] == 0
265
+ gdf_building_intensity.loc[idx, 'height'] = gdf_building_intensity[idx]['height'].apply(lambda h: min(max_height, h+4))
266
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
267
+
268
+ if 9 in policies:
269
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
270
+ max_height = gdf_building_intensity['height'].max()
271
+ gdf_building_intensity.loc[:, 'height'] = gdf_building_intensity['height'].apply(lambda h: min(max_height, h+1))
272
+ gdf_building_intensity['storeys'] = gdf_building_intensity['height'].apply(lambda h: str(h)+'s')
273
+
274
+ if 10 in policies:
275
+ if hazard_type == HAZARD_FLOOD or hazard_type == HAZARD_DEBRIS:
276
+ idx = gdf_building_intensity['rnd'] < 0.80
277
+ gdf_building_intensity.loc[idx,'occupancy'] = 'Agri'
278
+
279
  lr = (gdf_building_intensity['height'] <= 4)
280
  mr = (gdf_building_intensity['height'] >= 5) & (gdf_building_intensity['height'] <= 8)
281
  hr = (gdf_building_intensity['height'] >= 9)
282
  gdf_building_intensity.loc[lr, 'height_level'] = 'LR'
283
  gdf_building_intensity.loc[mr, 'height_level'] = 'MR'
284
  gdf_building_intensity.loc[hr, 'height_level'] = 'HR'
285
+
286
  # Earthquake uses simplified taxonomy
287
  gdf_building_intensity['vulnstreq'] = \
288
  gdf_building_intensity[['material','code_level','height_level']] \
289
  .agg('+'.join,axis=1)
290
+
291
+ gdf_building_intensity['expstr'] = \
292
+ gdf_building_intensity[['material','code_level','storeys','occupancy']] \
293
+ .agg('+'.join,axis=1)
294
+
295
+
296
  if hazard_type == HAZARD_EARTHQUAKE:
297
  bld_eq = gdf_building_intensity.merge(df_hazard, left_on='vulnstreq',right_on='expstr', how='left')
298
  nulls = bld_eq['muds1_g'].isna()
 
309
  bld_eq[f'ds_{i}'] = np.abs(bld_eq[f'prob_ds{i-1}'] - bld_eq[f'prob_ds{i}'])
310
  df_ds = bld_eq[['ds_1','ds_2','ds_3','ds_4','ds_5']]
311
  bld_eq['eq_ds'] = df_ds.idxmax(axis='columns').str.extract(r'ds_([0-9]+)').astype('int') - 1
 
 
 
 
 
 
312
  # Create a simplified building-hazard relation
313
  bld_hazard = bld_eq[['bldid','eq_ds']]
314
  bld_hazard = bld_hazard.rename(columns={'eq_ds':'ds'})
 
325
  bld_flood['fl_prob'] = np.diag(flood_mapping(xnew))
326
  bld_flood['fl_ds'] = 0
327
  bld_flood.loc[bld_flood['fl_prob'] > threshold_flood,'fl_ds'] = 1
 
 
 
 
 
328
  # Create a simplified building-hazard relation
329
  bld_hazard = bld_flood[['bldid','fl_ds']]
330
  bld_hazard = bld_hazard.rename(columns={'fl_ds':'ds'})
tomorrowcities/content/articles/flood.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ author: huseyin.kaya
3
+ title: Flood Vulnerability Analysus
4
+ description: Methodologies in flood damage assessment
5
+ image: https://images.unsplash.com/photo-1429041966141-44d228a42775?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2500&q=80
6
+ thumbnail: https://images.unsplash.com/photo-1429041966141-44d228a42775?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=350&q=80
7
+ alt: "Flood vulnerability analysis"
8
+ createdAt: 2023-10-10
9
+ duration: 6 min read
10
+ category:
11
+ - general
12
+ ---
13
+
14
+ The core component used in flood vulnerability analysis is to generate a mapping between water levels and relative damage on the structure. The shape of the curve depends on the typology of the structure, material type, height, code levels and many other features.
15
+
16
+ The Joint Research Centre (JRC) led by the European Commission provides technical reports and guidelines to generate damage curves [1]. It is also always possible to make minor modification for special cases such as single storey adobe buildings in Africa [2].
17
+
18
+ We provide a user interface to visualize and generate damages curves in [3].
19
+
20
+ ## Flood Vulnerability Calcul
21
+
22
+ ## Remarks
23
+ * In both JRC [1] and modified version by Englhardt et.al [2], the generated curves
24
+ do not depend on code levels of the structures. So any policy affecting code levels in flood damage assessment should find another way to change the damage states. See [policies](/docs/policies) for more information.
25
+
26
+
27
+ ## References
28
+
29
+ * [1] Global flood depth-damage functions: Methodology and the database with guidelines, [link](https://publications.jrc.ec.europa.eu/repository/handle/JRC105688)
30
+ * [2] Englhardt, Johanna, et al. "Enhancement of large-scale flood risk assessments using building-material-based vulnerability curves for an object-based approach in urban and rural areas." Natural Hazards and Earth System Sciences 19.8 (2019): 1703-1722. [link](https://nhess.copernicus.org/articles/19/1703/2019/nhess-19-1703-2019.pdf)
31
+ * [3] [Flood Vulnerability Generator](https://huggingface.co/spaces/hkayabilisim/flood_vulnerability_generator)
tomorrowcities/content/articles/policies.md CHANGED
@@ -14,9 +14,65 @@ category:
14
  ### Policy 1: Land and tenure security program
15
  When this policy applied, the code levels of the residential buildings are set to higher standards
16
  which effectively reduces the damage states during hazard simulations. Since this policy only changes
17
- the code levels, the computing engine is required to run again to see its effect.
 
 
 
 
 
 
18
 
19
  ### Policy 2: State-led upgrading/retrofitting of low-income/informal housing
20
  When applied, this policy increase the code level of the buildings located in low income A and B zones.
21
  This effectively reduces the damage states, and hence several impact metrics, starting from building-level
22
- metrics.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ### Policy 1: Land and tenure security program
15
  When this policy applied, the code levels of the residential buildings are set to higher standards
16
  which effectively reduces the damage states during hazard simulations. Since this policy only changes
17
+ the code levels, the computing engine is required to run again whevener this policy is applied.
18
+
19
+ There could be cases where the damage curves used to assess the vulnerability do not depend on code levels.
20
+ Flood damage curves, for instance, fall into this category. In such a case, we opt to increase the
21
+ height of buildings by addingt two storeys to work witk more suppressed damage curves.
22
+ Please note that, the scope of this change is only a temporary one and is bound only to flood damage calculation.
23
+
24
 
25
  ### Policy 2: State-led upgrading/retrofitting of low-income/informal housing
26
  When applied, this policy increase the code level of the buildings located in low income A and B zones.
27
  This effectively reduces the damage states, and hence several impact metrics, starting from building-level
28
+ metrics.
29
+
30
+ Similar to policy 1, if the code level is not used in damage assessment other features are used
31
+ to increase the stability of the structure. For instance, for flood calculations, the height of the structures
32
+ are increased by 2 storeys.
33
+
34
+ ### Policy 3: Robust investment in WASH (water, sanitation and hygiene) and flood-control infrastructure
35
+ When applied the expected outcome is exposure and Social Vulnerability reduction - decreased diseases,
36
+ casualties and other losses and damages in the event of floods due to better water and sewage management.
37
+
38
+ Since the effect of this policy is very dramatic, 6 storeys are added.
39
+
40
+ ### Policy 4: Investments in road networks and public spaces through conventional paving
41
+ Expected outcome: Exposure reduction - better mobility and more escape routes during hazard events.
42
+ Since the transportation network analysis is not done yet, we choose to improve the special
43
+ facilities to mimic the stability of road networks. In other works for flood hazard type, we decrese
44
+ the damage curve value for special facilities by increasing the height of the structures.
45
+
46
+ ### Policy 5: Shelter Law - All low-income and informal settlements should have physical and free access to community centres and shelters
47
+ Expected outcome: Social Vulnerability reduction - reducing the effects of displacement and other issues such as food insecurity.
48
+ Concerns: Implementation/Enforcement – evidence that some shelters remain unfunded or little effective despite their physical existence
49
+ In implementation, we filter residential buildings in low income regions, and slight increase the height levels.
50
+
51
+ ### Policy 6: Funding community-based networks in low-income areas (holistic approaches)
52
+ Expected outcome: Social Vulnerability reduction - meeting diverse emergency needs
53
+ Concerns: Implementation/Enforcement – funds could not be available as soon as hazards hit, decreasing their effectivity. Not certain how groups would allocate funding.
54
+ Implementation: filter non
55
+ In implementation, we filter commercial buildings in low income regions, and slight increase the height levels.
56
+
57
+ ### Policy 7: Urban farming programs
58
+ Expected outcome: Exposure Reduction - reserve of % of land to urban farming (by residents) in hazard-prone areas. Social Vulnerability reduction due to improved food security.
59
+ Concerns: Equity – who would benefit from policy in practice and have access to produce
60
+
61
+ In implementating this policy, we change the occupancy type of 30% of the residulual buildings
62
+ into agriculture. So the damage curves for the agricultural areas is much lower than residental types.
63
+
64
+ ### Policy 8: Emergency cash transfers to vulnerable households
65
+ Expected outcome: Social Vulnerability reduction - strengthening of economic capacity.
66
+ Concerns: Implementation/Enforcement – funds could not be available as soon as hazards hit, decreasing their effectivity. Equity – ‘invisible residents’ (e.g., migrants) would lose benefit.
67
+ Implementation: damage curves of non-special buildings are suppressed.
68
+
69
+ ### Policy 9: Waste collection and rivers cleaning program
70
+ Expected outcome: Social Vulnerability reduction – reduced risk of diseases and other negative effects of waste mixed with water runoff
71
+ Concerns: Implementation/Enforcement – policy could take a long time to generate meaningful results. Not clear if effective in the immediate aftermath of a flood
72
+ Implementation: damage curves of every structure in the visioning scenarios are moderately suppressed.
73
+
74
+ ## Policy 10: Enforcement of environmental protection zones
75
+ Expected outcome: Reduced exposure in hazard-prone or environmentally sensitive areas
76
+ Concerns: Equity – increased land prices or displacement of informal settlers in environmentally sensitive areas
77
+ Implementation: some random subset of buildings are assigned as agriculture mimiching to create protected zones.
78
+
tomorrowcities/content/articles/{power_network_analysis copy.md → power.md} RENAMED
File without changes
tomorrowcities/pages/engine.py CHANGED
@@ -111,8 +111,16 @@ layers = solara.reactive({
111
  'render_count': solara.reactive(0),
112
  'bounds': solara.reactive(None),
113
  'policies': {
114
- '1': {'id':1, 'label': 'Policy 1', 'description': 'Land and tenure security program', 'applied': solara.reactive(False)},
115
- '2': {'id':2, 'label': 'Policy 2', 'description': 'State-led upgrading/retrofitting of low-income/informal housing', 'applied': solara.reactive(False)},
 
 
 
 
 
 
 
 
116
  },
117
  'metrics': {
118
  "metric1": {"desc": "Number of workers unemployed", "value": 0, "max_value": 100},
@@ -536,7 +544,7 @@ def ExecutePanel():
536
 
537
  @solara.component
538
  def PolicyPanel():
539
- with solara.Row():
540
  for policy_key, policy in layers.value['policies'].items():
541
  with solara.Tooltip(tooltip=policy['description']):
542
  solara.Checkbox(label=policy['label'],
 
111
  'render_count': solara.reactive(0),
112
  'bounds': solara.reactive(None),
113
  'policies': {
114
+ '1': {'id':1, 'label': 'P1', 'description': 'Land and tenure security program', 'applied': solara.reactive(False)},
115
+ '2': {'id':2, 'label': 'P2', 'description': 'State-led upgrading/retrofitting of low-income/informal housing', 'applied': solara.reactive(False)},
116
+ '3': {'id':3, 'label': 'P3', 'description': 'Robust investment in WASH (water, sanitation and hygiene) and flood-control infrastructure', 'applied': solara.reactive(False)},
117
+ '4': {'id':4, 'label': 'P4', 'description': 'Investments in road networks and public spaces through conventional paving', 'applied': solara.reactive(False)},
118
+ '5': {'id':5, 'label': 'P5', 'description': 'Shelter Law - All low-income and informal settlements should have physical and free access to community centres and shelters', 'applied': solara.reactive(False)},
119
+ '6': {'id':6, 'label': 'P6', 'description': 'Funding community-based networks in low-income areas (holistic approaches)', 'applied': solara.reactive(False)},
120
+ '7': {'id':7, 'label': 'P7', 'description': 'Urban farming programs', 'applied': solara.reactive(False)},
121
+ '8': {'id':8, 'label': 'P8', 'description': 'Emergency cash transfers to vulnerable households', 'applied': solara.reactive(False)},
122
+ '9': {'id':9, 'label': 'P9', 'description': 'Waste collection and rivers cleaning program ', 'applied': solara.reactive(False)},
123
+ '10': {'id':10, 'label': 'P10', 'description': 'Enforcement of environmental protection zones', 'applied': solara.reactive(False)},
124
  },
125
  'metrics': {
126
  "metric1": {"desc": "Number of workers unemployed", "value": 0, "max_value": 100},
 
544
 
545
  @solara.component
546
  def PolicyPanel():
547
+ with solara.GridFixed(columns=6):
548
  for policy_key, policy in layers.value['policies'].items():
549
  with solara.Tooltip(tooltip=policy['description']):
550
  solara.Checkbox(label=policy['label'],