Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -162,13 +162,13 @@ with col1:
|
|
| 162 |
st.dataframe(data = units_df.T)
|
| 163 |
|
| 164 |
with col2:
|
| 165 |
-
st.subheader("Monthly Average Temperatures in 4 Major Markets
|
| 166 |
temp_chart = go.Figure()
|
| 167 |
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.weighted_avg_temp, name='Weighted-Average',mode='lines',line = dict(color = 'gray')))
|
| 168 |
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.MN_mon_avg_temp, name='MSP',mode='lines',line = dict(color = 'steelblue')))
|
| 169 |
-
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.
|
| 170 |
-
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.
|
| 171 |
-
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.
|
| 172 |
st.plotly_chart(temp_chart, theme="streamlit")
|
| 173 |
temp_df.columns = ['MSP monthly avg temp','Dallas monthly avg temp','Florida monthly avg temp','ATL monthly avg temp','Weighted Average']
|
| 174 |
st.dataframe(data = temp_df.T)
|
|
@@ -192,7 +192,7 @@ new_df['Year'] = pd.DatetimeIndex(new_df.index).year
|
|
| 192 |
elec_chart = go.Figure()
|
| 193 |
elec_chart.add_trace(go.Scatter(x=new_df.index[:-12], y=new_df.Electricity_Expense[:-12], name='Actual',mode='lines'))
|
| 194 |
elec_chart.add_trace(go.Scatter(x=new_df.index[:-12], y=new_df.simple_fcst[:-12], name = 'Simple Forecast', mode='lines', line = dict(color = 'red', dash = 'dash')))
|
| 195 |
-
elec_chart.add_trace(go.Scatter(x=new_df.index[:-12], y=new_df.
|
| 196 |
st.plotly_chart(elec_chart, theme="streamlit")
|
| 197 |
|
| 198 |
elec_df = new_df.groupby('Year').agg(
|
|
|
|
| 162 |
st.dataframe(data = units_df.T)
|
| 163 |
|
| 164 |
with col2:
|
| 165 |
+
st.subheader("Monthly Average Temperatures in 4 Major Markets with Forecast (°C)")
|
| 166 |
temp_chart = go.Figure()
|
| 167 |
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.weighted_avg_temp, name='Weighted-Average',mode='lines',line = dict(color = 'gray')))
|
| 168 |
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.MN_mon_avg_temp, name='MSP',mode='lines',line = dict(color = 'steelblue')))
|
| 169 |
+
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.TX_mon_avg_temp, name='DAL',mode='lines',line = dict(color = 'red')))
|
| 170 |
+
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.GA_mon_avg_temp, name='ATL',mode='lines',line = dict(color = 'green')))
|
| 171 |
+
temp_chart.add_trace(go.Scatter(x=temp_df.index, y=temp_df.FL_mon_avg_temp, name='FL',mode='lines',line = dict(color = 'yellow')))
|
| 172 |
st.plotly_chart(temp_chart, theme="streamlit")
|
| 173 |
temp_df.columns = ['MSP monthly avg temp','Dallas monthly avg temp','Florida monthly avg temp','ATL monthly avg temp','Weighted Average']
|
| 174 |
st.dataframe(data = temp_df.T)
|
|
|
|
| 192 |
elec_chart = go.Figure()
|
| 193 |
elec_chart.add_trace(go.Scatter(x=new_df.index[:-12], y=new_df.Electricity_Expense[:-12], name='Actual',mode='lines'))
|
| 194 |
elec_chart.add_trace(go.Scatter(x=new_df.index[:-12], y=new_df.simple_fcst[:-12], name = 'Simple Forecast', mode='lines', line = dict(color = 'red', dash = 'dash')))
|
| 195 |
+
elec_chart.add_trace(go.Scatter(x=new_df.index[:-12], y=new_df.ml_forecast_e[:-12], name = 'ML Forecast', mode='lines', line = dict(color = 'green', dash = 'dash')))
|
| 196 |
st.plotly_chart(elec_chart, theme="streamlit")
|
| 197 |
|
| 198 |
elec_df = new_df.groupby('Year').agg(
|