rehanafzal commited on
Commit
8a1710a
·
verified ·
1 Parent(s): 5a7c4c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -39,9 +39,9 @@ with tabs[0]:
39
  st.bar_chart(grid_health_counts)
40
 
41
  # Optimization recommendations
42
- current_demand = data["total_consumption_kwh"].iloc[-1]
43
- current_solar = data["solar_output_kw"].iloc[-1]
44
- current_wind = data["wind_output_kw"].iloc[-1]
45
  recommendation = optimize_load(current_demand, current_solar, current_wind)
46
 
47
  st.subheader("Recommendations")
@@ -55,13 +55,13 @@ with tabs[1]:
55
 
56
  # Total energy stored
57
  total_storage = 500 # Example of total energy storage
58
- st.subheader(f"Total Energy Stored: {total_storage} kWh")
59
 
60
  # Energy storage contribution from different sources
61
  st.subheader("Energy Storage Contributions")
62
  energy_sources = pd.DataFrame({
63
  "Source": ["Wind", "Solar", "Turbine"],
64
- "Energy (kW/min)": [5, 7, 10]
65
  })
66
  st.bar_chart(energy_sources.set_index("Source"))
67
 
@@ -79,13 +79,13 @@ with tabs[1]:
79
  st.plotly_chart(fig)
80
 
81
  with tabs[2]:
82
- st.title("Energy Trading Overview")
83
 
84
  # Energy cubes
85
  st.subheader("Energy Cubes Stored")
86
  energy_cubes = pd.DataFrame({
87
  "Country": ["China", "Banglandesh", "Sri Lanka"],
88
- "Energy (kWh)": [100, 200, 300],
89
  "Shareable": [True, True, False]
90
  })
91
 
@@ -96,5 +96,5 @@ with tabs[2]:
96
  # Visualization of energy that can be shared
97
  st.subheader("Energy Trading Visualization")
98
  st.markdown("The following energy amounts are available for sharing with different countries.")
99
- trading_fig = px.bar(energy_cubes, x="Country", y="Energy (kWh)", color="Shareable", title="Energy Trading")
100
  st.plotly_chart(trading_fig)
 
39
  st.bar_chart(grid_health_counts)
40
 
41
  # Optimization recommendations
42
+ current_demand = data["Electricity_consumption_Mwh"].iloc[-1]
43
+ current_solar = data["solar_output_mw"].iloc[-1]
44
+ current_wind = data["wind_output_mw"].iloc[-1]
45
  recommendation = optimize_load(current_demand, current_solar, current_wind)
46
 
47
  st.subheader("Recommendations")
 
55
 
56
  # Total energy stored
57
  total_storage = 500 # Example of total energy storage
58
+ st.subheader(f"Total Energy Stored: {total_storage} MWh")
59
 
60
  # Energy storage contribution from different sources
61
  st.subheader("Energy Storage Contributions")
62
  energy_sources = pd.DataFrame({
63
  "Source": ["Wind", "Solar", "Turbine"],
64
+ "Energy (MW/min)": [5, 7, 10]
65
  })
66
  st.bar_chart(energy_sources.set_index("Source"))
67
 
 
79
  st.plotly_chart(fig)
80
 
81
  with tabs[2]:
82
+ st.title("Electricity Trading Overview")
83
 
84
  # Energy cubes
85
  st.subheader("Energy Cubes Stored")
86
  energy_cubes = pd.DataFrame({
87
  "Country": ["China", "Banglandesh", "Sri Lanka"],
88
+ "Energy (MWh)": [100, 200, 300],
89
  "Shareable": [True, True, False]
90
  })
91
 
 
96
  # Visualization of energy that can be shared
97
  st.subheader("Energy Trading Visualization")
98
  st.markdown("The following energy amounts are available for sharing with different countries.")
99
+ trading_fig = px.bar(energy_cubes, x="Country", y="Energy (MWh)", color="Shareable", title="Energy Trading")
100
  st.plotly_chart(trading_fig)