Spaces:
Sleeping
Sleeping
Update dashboard.py
Browse files- dashboard.py +32 -8
dashboard.py
CHANGED
@@ -185,8 +185,29 @@ def load_institute_network(topic, **kwargs):
|
|
185 |
html_pane = pn.pane.HTML(html)
|
186 |
return html_pane
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
-
|
190 |
# Define a function to generate Curve based on selected values
|
191 |
def generate_entity_curves(region_value, type_value, **kwargs):
|
192 |
if region_value=='eu':
|
@@ -299,7 +320,7 @@ def generate_radio_buttons(value):
|
|
299 |
button1 = pn.widgets.Button(name="Introduction", button_type="warning", icon="file-info", styles={"width": "100%"})
|
300 |
button2 = pn.widgets.Button(name="AECO Macro Topics", button_type="warning", icon="chart-histogram", styles={"width": "100%"})
|
301 |
button3 = pn.widgets.Button(name="Research Collaboration Networks: Institutes", button_type="warning", icon="chart-dots-3", styles={"width": "100%"})
|
302 |
-
|
303 |
#button5 = pn.widgets.Button(name="Entity Chord Diagrams", button_type="warning", icon="chart-dots-filled", styles={"width": "100%"})
|
304 |
|
305 |
region1 = pn.widgets.RadioButtonGroup(name='### Select News Region', options=regions)
|
@@ -347,7 +368,7 @@ def show_page(page_key):
|
|
347 |
button1.on_click(lambda event: show_page("Page1"))
|
348 |
button2.on_click(lambda event: show_page("Page2"))
|
349 |
button3.on_click(lambda event: show_page("Page3"))
|
350 |
-
|
351 |
#button5.on_click(lambda event: show_page("Page5"))
|
352 |
#button6.on_click(lambda event: show_page("Page6"))
|
353 |
|
@@ -391,11 +412,14 @@ def CreatePage3():
|
|
391 |
align="center",
|
392 |
)
|
393 |
|
|
|
394 |
def CreatePage4():
|
395 |
return pn.Column(
|
396 |
-
|
397 |
-
|
398 |
-
align="center",
|
|
|
|
|
399 |
|
400 |
def CreatePage5():
|
401 |
return pn.Column(
|
@@ -421,9 +445,9 @@ mapping = {
|
|
421 |
"Page1": CreatePage1(),
|
422 |
"Page2": CreatePage2(),
|
423 |
"Page3": CreatePage3(),
|
424 |
-
|
425 |
#"Page5": CreatePage5(),
|
426 |
-
"Page6": CreatePage6()
|
427 |
}
|
428 |
|
429 |
#################### SIDEBAR LAYOUT ##########################
|
|
|
185 |
html_pane = pn.pane.HTML(html)
|
186 |
return html_pane
|
187 |
|
188 |
+
def load_country_network(topic, **kwargs):
|
189 |
+
if topic=='Energy-Efficient Building Design for Thermal Comfort and Sustainability':
|
190 |
+
html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1W-ZjXP5vpJ7pwaCT7KFjh1txNgBkIT6h" width="1000" height="800"></iframe>"""
|
191 |
+
html_pane = pn.pane.HTML(html)
|
192 |
+
return html_pane
|
193 |
+
elif topic=='Indoor Air Quality and Energy Efficiency in Low-Energy Houses':
|
194 |
+
html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1rqPx3X_9Hnv9mTq2bMCbWWh5VIOw9CRh" width="1000" height="800"></iframe>"""
|
195 |
+
html_pane = pn.pane.HTML(html)
|
196 |
+
return html_pane
|
197 |
+
elif topic=='Smart Cities and Urban Computing':
|
198 |
+
html = """<iframe src="" width="1000" height="800"></iframe>"""
|
199 |
+
html_pane = pn.pane.HTML(html)
|
200 |
+
return html_pane
|
201 |
+
elif topic=='Renewable Energy Systems: Solar PV & Building Applications':
|
202 |
+
html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1BC0Dbmayyxv3G9wLt2fUSTiUL2vwzuLD" width="1000" height="800"></iframe>"""
|
203 |
+
html_pane = pn.pane.HTML(html)
|
204 |
+
return html_pane
|
205 |
+
elif topic=='BIM in AEC: Trends, Challenges, and Opportunities':
|
206 |
+
html = """<iframe src="https://app.vosviewer.com/?json=https%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1V-Cto19dxV_GR3MtNP6Yk642CnTQkjEK" width="1000" height="800"></iframe>"""
|
207 |
+
html_pane = pn.pane.HTML(html)
|
208 |
+
return html_pane
|
209 |
|
210 |
+
|
211 |
# Define a function to generate Curve based on selected values
|
212 |
def generate_entity_curves(region_value, type_value, **kwargs):
|
213 |
if region_value=='eu':
|
|
|
320 |
button1 = pn.widgets.Button(name="Introduction", button_type="warning", icon="file-info", styles={"width": "100%"})
|
321 |
button2 = pn.widgets.Button(name="AECO Macro Topics", button_type="warning", icon="chart-histogram", styles={"width": "100%"})
|
322 |
button3 = pn.widgets.Button(name="Research Collaboration Networks: Institutes", button_type="warning", icon="chart-dots-3", styles={"width": "100%"})
|
323 |
+
button4 = pn.widgets.Button(name="Research Collaboration Networks: Countries", button_type="warning", icon="chart-dots-3", styles={"width": "100%"})
|
324 |
#button5 = pn.widgets.Button(name="Entity Chord Diagrams", button_type="warning", icon="chart-dots-filled", styles={"width": "100%"})
|
325 |
|
326 |
region1 = pn.widgets.RadioButtonGroup(name='### Select News Region', options=regions)
|
|
|
368 |
button1.on_click(lambda event: show_page("Page1"))
|
369 |
button2.on_click(lambda event: show_page("Page2"))
|
370 |
button3.on_click(lambda event: show_page("Page3"))
|
371 |
+
button4.on_click(lambda event: show_page("Page4"))
|
372 |
#button5.on_click(lambda event: show_page("Page5"))
|
373 |
#button6.on_click(lambda event: show_page("Page6"))
|
374 |
|
|
|
412 |
align="center",
|
413 |
)
|
414 |
|
415 |
+
|
416 |
def CreatePage4():
|
417 |
return pn.Column(
|
418 |
+
macro_topics_button,
|
419 |
+
pn.bind(load_country_network, macro_topics_button),
|
420 |
+
align="center",
|
421 |
+
)
|
422 |
+
|
423 |
|
424 |
def CreatePage5():
|
425 |
return pn.Column(
|
|
|
445 |
"Page1": CreatePage1(),
|
446 |
"Page2": CreatePage2(),
|
447 |
"Page3": CreatePage3(),
|
448 |
+
"Page4": CreatePage4(),
|
449 |
#"Page5": CreatePage5(),
|
450 |
+
#"Page6": CreatePage6()
|
451 |
}
|
452 |
|
453 |
#################### SIDEBAR LAYOUT ##########################
|