Spaces:
Runtime error
Runtime error
| 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)) | |