Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,7 +117,20 @@ def main():
|
|
| 117 |
if tabs =='Dashboard':
|
| 118 |
st.title("Navigation Bar")
|
| 119 |
st.header("Complaints")
|
| 120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
|
| 122 |
|
| 123 |
st.dataframe(complaints_df)
|
|
|
|
| 117 |
if tabs =='Dashboard':
|
| 118 |
st.title("Navigation Bar")
|
| 119 |
st.header("Complaints")
|
| 120 |
+
|
| 121 |
+
# Pie Chart for Resolution Status
|
| 122 |
+
fig, ax = plt.subplots()
|
| 123 |
+
complaints_df['resolution_status'].value_counts().plot(kind='pie', autopct='%1.1f%%', ax=ax)
|
| 124 |
+
ax.set_ylabel('')
|
| 125 |
+
st.pyplot(fig)
|
| 126 |
+
|
| 127 |
+
# Word Cloud for Complaint Description
|
| 128 |
+
text = " ".join(df['complaint_description'])
|
| 129 |
+
wordcloud = WordCloud(width=800, height=400).generate(text)
|
| 130 |
+
plt.figure(figsize=(8, 4))
|
| 131 |
+
plt.imshow(wordcloud, interpolation='bilinear')
|
| 132 |
+
plt.axis('off')
|
| 133 |
+
st.pyplot(plt)
|
| 134 |
|
| 135 |
|
| 136 |
st.dataframe(complaints_df)
|