zavavan commited on
Commit
fba3086
·
verified ·
1 Parent(s): f87790d

Update dashboard.py

Browse files
Files changed (1) hide show
  1. dashboard.py +76 -16
dashboard.py CHANGED
@@ -37,10 +37,6 @@ hv.extension('bokeh')
37
 
38
  dna_folder = './data'
39
 
40
- macro_topics = ["Energy-Efficient Building Design for Thermal Comfort and Sustainability","Indoor Air Quality and Energy Efficiency in Low-Energy Houses","Urban Planning and Development in China\'s Cities", "Design Thinking and Sustainable Product Development", "Smart Cities and Urban Computing", "Urban Resilience and Water Management","Renewable Energy Systems: Solar PV & Building Applications","Exploring the Intersection of Traditional Heritage and Modern Steel Architecture in Historical Buildings","Green Building Assessment and Design","Landscape Design, Planning, and Research: Integrating Cultural, Ecological, and Rural Perspectives", "Noise and Acoustic Design in Urban Development","Sustainable Building Materials: Wood & 3D Printing Innovations","BIM in AEC: Trends, Challenges, and Opportunities","Urban Food Systems: Community Development and Social Sustainability in Cities","Innovative Bridge Design and Construction: Trends and Case Studies", "Cavity Flow and Heat Transfer"]
41
-
42
-
43
-
44
  ## AECO topic over time html file:
45
  AECO_topics_over_time_file_path = '/assets/optimized_merged_AECO_topics_over_time_2D.html'
46
 
@@ -164,17 +160,81 @@ def create_curve_chart():
164
  overlay.opts(show_legend = True, legend_position='top_left', width=1200, height=600)
165
  return overlay
166
 
 
167
 
168
- def create_bar_charts(region, **kwargs):
169
- if region=='eu':
170
- sliced = sorted_ent_type_freq_map_eu
171
- return hv.Bars(sliced, hv.Dimension('Entity Types'), 'Frequency').opts( framewise=True, xrotation=45,width=1200, height=600)
172
- elif region=='us':
173
- sliced = sorted_ent_type_freq_map_us
174
- return hv.Bars(sliced, hv.Dimension('Entity Types'), 'Frequency').opts(framewise=True, xrotation=45,width=1200, height=600)
175
- elif region=='eu_us':
176
- sliced = sorted_ent_type_freq_map_eu_us
177
- return hv.Bars(sliced, hv.Dimension('Entity Types'), 'Frequency').opts(framewise=True, xrotation=45,width=1200, height=600)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
 
179
 
180
 
@@ -376,7 +436,7 @@ def CreatePage2():
376
  def CreatePage3():
377
  return pn.Column(
378
  macro_topics_button,
379
- # pn.bind(create_bar_charts, region1),
380
  align="center",
381
  )
382
 
@@ -433,7 +493,7 @@ template = pn.template.BootstrapTemplate(
433
  header_background="black",
434
  #site="Charting the Landscape of AECO Research",
435
  theme=pn.template.DarkTheme,
436
- sidebar_width=250, ## Default is 330
437
  busy_indicator=pn.indicators.BooleanStatus(value=True),
438
  )
439
 
 
37
 
38
  dna_folder = './data'
39
 
 
 
 
 
40
  ## AECO topic over time html file:
41
  AECO_topics_over_time_file_path = '/assets/optimized_merged_AECO_topics_over_time_2D.html'
42
 
 
160
  overlay.opts(show_legend = True, legend_position='top_left', width=1200, height=600)
161
  return overlay
162
 
163
+ macro_topics = ["Energy-Efficient Building Design for Thermal Comfort and Sustainability","Indoor Air Quality and Energy Efficiency in Low-Energy Houses","Urban Planning and Development in China\'s Cities", "Design Thinking and Sustainable Product Development", "Smart Cities and Urban Computing", "Urban Resilience and Water Management","Renewable Energy Systems: Solar PV & Building Applications","Exploring the Intersection of Traditional Heritage and Modern Steel Architecture in Historical Buildings","Green Building Assessment and Design","Landscape Design, Planning, and Research: Integrating Cultural, Ecological, and Rural Perspectives", "Noise and Acoustic Design in Urban Development","Sustainable Building Materials: Wood & 3D Printing Innovations","BIM in AEC: Trends, Challenges, and Opportunities","Urban Food Systems: Community Development and Social Sustainability in Cities","Innovative Bridge Design and Construction: Trends and Case Studies", "Cavity Flow and Heat Transfer"]
164
 
165
+ def load_institute_network(topic, **kwargs):
166
+ if topic=='Energy-Efficient Building Design for Thermal Comfort and Sustainability':
167
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
168
+ html_pane = pn.pane.HTML(html)
169
+ return html_pane
170
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
171
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
172
+ html_pane = pn.pane.HTML(html)
173
+ return html_pane
174
+ elif region=='Urban Planning and Development in China\'s Cities':
175
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
176
+ html_pane = pn.pane.HTML(html)
177
+ return html_pane
178
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
179
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
180
+ html_pane = pn.pane.HTML(html)
181
+ return html_pane
182
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
183
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
184
+ html_pane = pn.pane.HTML(html)
185
+ return html_pane
186
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
187
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
188
+ html_pane = pn.pane.HTML(html)
189
+ return html_pane
190
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
191
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
192
+ html_pane = pn.pane.HTML(html)
193
+ return html_pane
194
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
195
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
196
+ html_pane = pn.pane.HTML(html)
197
+ return html_pane
198
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
199
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
200
+ html_pane = pn.pane.HTML(html)
201
+ return html_pane
202
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
203
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
204
+ html_pane = pn.pane.HTML(html)
205
+ return html_pane
206
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
207
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
208
+ html_pane = pn.pane.HTML(html)
209
+ return html_pane
210
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
211
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
212
+ html_pane = pn.pane.HTML(html)
213
+ return html_pane
214
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
215
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
216
+ html_pane = pn.pane.HTML(html)
217
+ return html_pane
218
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
219
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
220
+ html_pane = pn.pane.HTML(html)
221
+ return html_pane
222
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
223
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
224
+ html_pane = pn.pane.HTML(html)
225
+ return html_pane
226
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
227
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
228
+ html_pane = pn.pane.HTML(html)
229
+ return html_pane
230
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
231
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
232
+ html_pane = pn.pane.HTML(html)
233
+ return html_pane
234
+ elif region=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
235
+ html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D16q1oLQyEeMosAgeD9UkC9hSrpzAYX_-n" width="800" height="800"></iframe>"""
236
+ html_pane = pn.pane.HTML(html)
237
+ return html_pane
238
 
239
 
240
 
 
436
  def CreatePage3():
437
  return pn.Column(
438
  macro_topics_button,
439
+ pn.bind(load_institute_network, macro_topics_button),
440
  align="center",
441
  )
442
 
 
493
  header_background="black",
494
  #site="Charting the Landscape of AECO Research",
495
  theme=pn.template.DarkTheme,
496
+ sidebar_width=330, ## Default is 330
497
  busy_indicator=pn.indicators.BooleanStatus(value=True),
498
  )
499