Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,10 +100,28 @@ if 'key0' in st.session_state:
|
|
| 100 |
|
| 101 |
if topic == 'Vulnerability':
|
| 102 |
|
| 103 |
-
# Display
|
| 104 |
-
col1, col2 = [1,1]
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
# Display the table
|
| 109 |
st.table(st.session_state['key0'])
|
|
|
|
| 100 |
|
| 101 |
if topic == 'Vulnerability':
|
| 102 |
|
| 103 |
+
# Display charts
|
| 104 |
+
col1, col2 = st.columns([1,1])
|
| 105 |
+
|
| 106 |
+
# Pie chart
|
| 107 |
+
with col1:
|
| 108 |
+
print(type(st.session_state['key0']))
|
| 109 |
+
|
| 110 |
+
bar_data = st.session_state['key0']
|
| 111 |
+
|
| 112 |
+
# fig = px.bar(chart3_data,
|
| 113 |
+
# x="Year",
|
| 114 |
+
# y="Value",
|
| 115 |
+
# color='Country',
|
| 116 |
+
# title='Chart 3 - Total Population',
|
| 117 |
+
# hover_name="Value",
|
| 118 |
+
# color_discrete_sequence=px.colors.qualitative.Plotly
|
| 119 |
+
# )
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
# Bar cart
|
| 124 |
+
|
| 125 |
|
| 126 |
# Display the table
|
| 127 |
st.table(st.session_state['key0'])
|