Spaces:
Sleeping
Sleeping
wzkariampuzha
commited on
Commit
•
062e24e
1
Parent(s):
f28ad72
Update app.py
Browse files
app.py
CHANGED
@@ -76,9 +76,9 @@ def epi_sankey(sankey_data):
|
|
76 |
node = dict(
|
77 |
pad = 15,
|
78 |
thickness = 20,
|
79 |
-
line = dict(color = "
|
80 |
label = ["PubMed IDs Gathered", "Irrelevant Abstracts","Relevant Abstracts Gathered","Epidemiologic Abstracts","Not Epidemiologic"],
|
81 |
-
color = "
|
82 |
),
|
83 |
#label = ["A1", "A2", "B1", "B2", "C1", "C2"]
|
84 |
link = dict(
|
@@ -86,6 +86,11 @@ def epi_sankey(sankey_data):
|
|
86 |
target = [2, 1, 3, 4],
|
87 |
value = [relevant, gathered-relevant, epidemiologic, relevant-epidemiologic]
|
88 |
))])
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
return fig
|
91 |
|
@@ -119,8 +124,8 @@ if disease_or_gard_id:
|
|
119 |
mime='text/csv',
|
120 |
)
|
121 |
#st.dataframe(data=None, width=None, height=None)
|
122 |
-
fig = epi_sankey(sankey_data)
|
123 |
|
124 |
-
if st.button('Display Sankey Diagram'):
|
125 |
st.plotly_chart(fig, use_container_width=True)
|
126 |
# st.code(body, language="python")
|
|
|
76 |
node = dict(
|
77 |
pad = 15,
|
78 |
thickness = 20,
|
79 |
+
line = dict(color = "white", width = 0.5),
|
80 |
label = ["PubMed IDs Gathered", "Irrelevant Abstracts","Relevant Abstracts Gathered","Epidemiologic Abstracts","Not Epidemiologic"],
|
81 |
+
color = "violet"
|
82 |
),
|
83 |
#label = ["A1", "A2", "B1", "B2", "C1", "C2"]
|
84 |
link = dict(
|
|
|
86 |
target = [2, 1, 3, 4],
|
87 |
value = [relevant, gathered-relevant, epidemiologic, relevant-epidemiologic]
|
88 |
))])
|
89 |
+
fig.update_layout(
|
90 |
+
hovermode = 'x',
|
91 |
+
title="Search for the Epidemiology of "+disease_or_gard_id,
|
92 |
+
font=dict(size = 10, color = 'black'),
|
93 |
+
)
|
94 |
|
95 |
return fig
|
96 |
|
|
|
124 |
mime='text/csv',
|
125 |
)
|
126 |
#st.dataframe(data=None, width=None, height=None)
|
127 |
+
fig = epi_sankey(sankey_data,disease_or_gard_id)
|
128 |
|
129 |
+
if st.button('Display Sankey Diagram of Automated Search'):
|
130 |
st.plotly_chart(fig, use_container_width=True)
|
131 |
# st.code(body, language="python")
|