Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,13 +83,10 @@ filtered_data = data if selected_year == 'All Time' else data[data['Year Reporte
|
|
| 83 |
st.header(f"Analysis for {'All Time' if selected_year == 'All Time' else selected_year}")
|
| 84 |
|
| 85 |
# Display metrics
|
| 86 |
-
col1, col2
|
| 87 |
with col1:
|
| 88 |
st.metric("Total Complaints", len(filtered_data))
|
| 89 |
with col2:
|
| 90 |
-
avg_time = filtered_data['Processing Time'].mean()
|
| 91 |
-
st.metric("Average Processing Time", f"{avg_time:.1f} days" if pd.notna(avg_time) else "N/A")
|
| 92 |
-
with col3:
|
| 93 |
most_common = filtered_data['Type of Complaint'].value_counts().index[0] if not filtered_data.empty else "N/A"
|
| 94 |
st.metric("Most Common Type", most_common)
|
| 95 |
|
|
|
|
| 83 |
st.header(f"Analysis for {'All Time' if selected_year == 'All Time' else selected_year}")
|
| 84 |
|
| 85 |
# Display metrics
|
| 86 |
+
col1, col2 = st.columns(2)
|
| 87 |
with col1:
|
| 88 |
st.metric("Total Complaints", len(filtered_data))
|
| 89 |
with col2:
|
|
|
|
|
|
|
|
|
|
| 90 |
most_common = filtered_data['Type of Complaint'].value_counts().index[0] if not filtered_data.empty else "N/A"
|
| 91 |
st.metric("Most Common Type", most_common)
|
| 92 |
|