File size: 642 Bytes
ac922de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# app.py

import streamlit as st
from salesforce_integration import fetch_poles
import plotly.express as px
from modules.visuals import display_dashboard, display_charts



st.title("πŸ“‘ VIEP Smart Poles Dashboard (Salesforce Data)")

# Fetch Data
df = fetch_poles()

# Display Table
st.subheader("πŸ“‹ Pole Table")
st.dataframe(df)

# Charts
st.subheader("βš™ Energy Generation (Solar vs Wind)")
st.plotly_chart(px.bar(df, x="Name", y=["Solar_Generation__c", "Wind_Generation__c"], barmode="group"))

st.subheader("πŸŽ₯ Camera Status")
st.plotly_chart(px.pie(df, names="Camera_Status__c", hole=0.4))
display_dashboard(df)
display_charts(df)