Spaces:
Sleeping
Sleeping
Update modules/visuals.py
Browse files- modules/visuals.py +5 -9
modules/visuals.py
CHANGED
@@ -6,15 +6,11 @@ import streamlit as st
|
|
6 |
def display_dashboard(filtered_df):
|
7 |
st.title("VIEP Smart Poles Dashboard")
|
8 |
|
9 |
-
|
10 |
-
col1, col2, col3
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
col3.metric("⚡ Power Issues", df[df["Power_Sufficient__c"] == "No"].shape[0])
|
15 |
-
col4.metric("📷 Offline Cameras", df[df["Camera_Status__c"] == "Offline"].shape[0])
|
16 |
-
|
17 |
-
|
18 |
|
19 |
# Function to generate the alert level breakdown chart
|
20 |
def display_charts(filtered_df):
|
|
|
6 |
def display_dashboard(filtered_df):
|
7 |
st.title("VIEP Smart Poles Dashboard")
|
8 |
|
9 |
+
# Display system summary
|
10 |
+
col1, col2, col3 = st.columns(3)
|
11 |
+
col1.metric("Total Poles", filtered_df.shape[0])
|
12 |
+
col2.metric("Red Alerts", filtered_df[filtered_df['Alert_Level__c'] == 'Red'].shape[0])
|
13 |
+
col3.metric("Power Insufficiencies", filtered_df[filtered_df['Power_Status__c'] == 'Insufficient'].shape[0])
|
|
|
|
|
|
|
|
|
14 |
|
15 |
# Function to generate the alert level breakdown chart
|
16 |
def display_charts(filtered_df):
|