-
Notifications
You must be signed in to change notification settings - Fork 11
/
upload_viz_to_datapane.py
39 lines (33 loc) · 1.09 KB
/
upload_viz_to_datapane.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Upload HTMLs to Datapane
# Reference: https://docs.datapane.com/reports/blocks/text-code-and-html
import datapane as dp
# =====================================
# Network 1 - Subset Data (Repulsion)
# =====================================
with open('visualization_html/drug_interactions_network_subset_repulsion.html', 'r') as f:
html_network_1 = f.read()
dp.Report(
dp.HTML(
html_network_1
)
).upload(name='drug_interactions_network_1.html')
# =====================================
# Network 2 - Subset Data (Barnes_Hut)
# =====================================
with open('visualization_html/drug_interactions_network_subset_barnes.html', 'r') as f:
html_network_2 = f.read()
dp.Report(
dp.HTML(
html_network_2
)
).upload(name='drug_interactions_network_2.html')
# =====================================
# Network 3 - Phenytoin
# =====================================
with open('visualization_html/drug_interactions_network_phenytoin.html', 'r') as f:
html_network_3 = f.read()
dp.Report(
dp.HTML(
html_network_3
)
).upload(name='drug_interactions_network_3.html')