Prasanna1622 commited on
Commit
f58d796
·
verified ·
1 Parent(s): f2db6d4

Update modules/visuals.py

Browse files
Files changed (1) hide show
  1. 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
- st.subheader("📊 System Summary")
10
- col1, col2, col3, col4 = st.columns(4)
11
-
12
- col1.metric("Total Poles", df.shape[0])
13
- col2.metric("🚨 Red Alerts", df[df["Alert_Level__c"] == "Red"].shape[0])
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):