Spaces:
Runtime error
Runtime error
File size: 542 Bytes
d529d0a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
import pandas as pd
import plotly.express as px
# Define the data
data = pd.DataFrame({
'Illness': ['Anxiety', 'Depression', 'Diabetes', 'Heart Disease'],
'Cost (Billion USD)': [42, 210, 327, 219]
})
# Define the sunburst plot
fig = px.sunburst(
data,
path=['Illness'],
values='Cost (Billion USD)',
color='Cost (Billion USD)',
color_continuous_scale='blues'
)
# Define the Streamlit app
st.title('Cost of Illnesses in Billion USD per Year')
st.plotly_chart(fig, use_container_width=True)
|