Update app.py
Browse files
app.py
CHANGED
|
@@ -229,6 +229,30 @@ elif st.session_state.current_page == "Simple EDA":
|
|
| 229 |
st.dataframe(data.describe())
|
| 230 |
|
| 231 |
st.markdown("<br>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
|
| 233 |
|
| 234 |
if st.button("π Go Back to Model Report"):
|
|
|
|
| 229 |
st.dataframe(data.describe())
|
| 230 |
|
| 231 |
st.markdown("<br>", unsafe_allow_html=True)
|
| 232 |
+
|
| 233 |
+
# Add Boxplot Visualizations
|
| 234 |
+
st.markdown("<h3 class='subtitle' style='text-align: center;'>Boxplots for Data Distribution</h3>", unsafe_allow_html=True)
|
| 235 |
+
|
| 236 |
+
# Define columns for visualization
|
| 237 |
+
columns = ['Life expectancy', 'Adult Mortality',
|
| 238 |
+
'infant deaths', 'Alcohol', 'percentage expenditure', 'Hepatitis B',
|
| 239 |
+
'Measles', 'BMI', 'under-five deaths', 'Polio', 'Total expenditure',
|
| 240 |
+
'Diphtheria', 'HIV/AIDS', 'GDP', 'Population', 'thinness 1-19 years',
|
| 241 |
+
'thinness 5-9 years', 'Income composition of resources', 'Schooling']
|
| 242 |
+
|
| 243 |
+
# Matplotlib figure setup
|
| 244 |
+
fig, axes = plt.subplots(nrows=10, ncols=2, figsize=(12, 30)) # Adjust grid size
|
| 245 |
+
axes = axes.flatten()
|
| 246 |
+
|
| 247 |
+
for i, col in enumerate(columns):
|
| 248 |
+
sns.boxplot(x=data[col], ax=axes[i], color="skyblue") # Create boxplots
|
| 249 |
+
axes[i].set_title(f'Boxplot of {col}', fontsize=12)
|
| 250 |
+
axes[i].set_xlabel("")
|
| 251 |
+
|
| 252 |
+
plt.tight_layout()
|
| 253 |
+
st.pyplot(fig)
|
| 254 |
+
|
| 255 |
+
st.markdown("<br>", unsafe_allow_html=True)
|
| 256 |
|
| 257 |
|
| 258 |
if st.button("π Go Back to Model Report"):
|