Spaces:
Runtime error
Runtime error
File size: 530 Bytes
334f3bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import streamlit as st
from salesforce_integration import fetch_poles
import plotly.express as px
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))
|