Prasanna1622 commited on
Commit
69ca979
Β·
verified Β·
1 Parent(s): d8d4a40

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+
3
+ import streamlit as st
4
+ from salesforce_integration import fetch_poles
5
+ import plotly.express as px
6
+
7
+ st.title("πŸ“‘ VIEP Smart Poles Dashboard (Salesforce Data)")
8
+
9
+ # Fetch Data
10
+ df = fetch_poles()
11
+
12
+ # Display Table
13
+ st.subheader("πŸ“‹ Pole Table")
14
+ st.dataframe(df)
15
+
16
+ # Charts
17
+ st.subheader("βš™ Energy Generation (Solar vs Wind)")
18
+ st.plotly_chart(px.bar(df, x="Name", y=["Solar_Generation__c", "Wind_Generation__c"], barmode="group"))
19
+
20
+ st.subheader("πŸŽ₯ Camera Status")
21
+ st.plotly_chart(px.pie(df, names="Camera_Status__c", hole=0.4))