Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,8 +102,6 @@ def dashboard_overview():
|
|
| 102 |
st.plotly_chart(fig1, use_container_width=True)
|
| 103 |
|
| 104 |
# Download buttons
|
| 105 |
-
csv = df_total_filtered.to_csv(index=False).encode('utf-8')
|
| 106 |
-
st.download_button("📥 Download Registration Data (CSV)", csv, "registration_data.csv", "text/csv")
|
| 107 |
excel_buffer = io.BytesIO()
|
| 108 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 109 |
df_total_filtered.to_excel(writer, index=False)
|
|
@@ -124,8 +122,6 @@ def dashboard_overview():
|
|
| 124 |
st.plotly_chart(fig2, use_container_width=True)
|
| 125 |
|
| 126 |
# Download buttons
|
| 127 |
-
csv = df_fuel_grouped.to_csv(index=False).encode('utf-8')
|
| 128 |
-
st.download_button("📥 Download Fuel Trend (CSV)", csv, "fuel_trend.csv", "text/csv")
|
| 129 |
excel_buffer = io.BytesIO()
|
| 130 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 131 |
df_fuel_grouped.to_excel(writer, index=False)
|
|
@@ -144,8 +140,7 @@ def dashboard_overview():
|
|
| 144 |
st.plotly_chart(fig3, use_container_width=True)
|
| 145 |
|
| 146 |
# Download buttons
|
| 147 |
-
|
| 148 |
-
st.download_button("📥 Download Class Trend (CSV)", csv, "vehicle_class_trend.csv", "text/csv")
|
| 149 |
excel_buffer = io.BytesIO()
|
| 150 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 151 |
df_class_grouped.to_excel(writer, index=False)
|
|
@@ -164,8 +159,7 @@ def dashboard_overview():
|
|
| 164 |
st.plotly_chart(fig5, use_container_width=True)
|
| 165 |
|
| 166 |
# Download buttons
|
| 167 |
-
|
| 168 |
-
st.download_button("📥 Download Top 10 EV States (CSV)", csv, "top_ev_states.csv", "text/csv")
|
| 169 |
excel_buffer = io.BytesIO()
|
| 170 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 171 |
df_ev_statewise.to_excel(writer, index=False)
|
|
@@ -178,8 +172,7 @@ def dashboard_overview():
|
|
| 178 |
st.plotly_chart(fig6, use_container_width=True)
|
| 179 |
|
| 180 |
# Download buttons
|
| 181 |
-
|
| 182 |
-
st.download_button("📥 Download EV vs Total Over Time (CSV)", csv, "ev_vs_total.csv", "text/csv")
|
| 183 |
excel_buffer = io.BytesIO()
|
| 184 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 185 |
df_total_vs_ev.to_excel(writer, index=False)
|
|
|
|
| 102 |
st.plotly_chart(fig1, use_container_width=True)
|
| 103 |
|
| 104 |
# Download buttons
|
|
|
|
|
|
|
| 105 |
excel_buffer = io.BytesIO()
|
| 106 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 107 |
df_total_filtered.to_excel(writer, index=False)
|
|
|
|
| 122 |
st.plotly_chart(fig2, use_container_width=True)
|
| 123 |
|
| 124 |
# Download buttons
|
|
|
|
|
|
|
| 125 |
excel_buffer = io.BytesIO()
|
| 126 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 127 |
df_fuel_grouped.to_excel(writer, index=False)
|
|
|
|
| 140 |
st.plotly_chart(fig3, use_container_width=True)
|
| 141 |
|
| 142 |
# Download buttons
|
| 143 |
+
|
|
|
|
| 144 |
excel_buffer = io.BytesIO()
|
| 145 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 146 |
df_class_grouped.to_excel(writer, index=False)
|
|
|
|
| 159 |
st.plotly_chart(fig5, use_container_width=True)
|
| 160 |
|
| 161 |
# Download buttons
|
| 162 |
+
|
|
|
|
| 163 |
excel_buffer = io.BytesIO()
|
| 164 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 165 |
df_ev_statewise.to_excel(writer, index=False)
|
|
|
|
| 172 |
st.plotly_chart(fig6, use_container_width=True)
|
| 173 |
|
| 174 |
# Download buttons
|
| 175 |
+
|
|
|
|
| 176 |
excel_buffer = io.BytesIO()
|
| 177 |
with pd.ExcelWriter(excel_buffer, engine='xlsxwriter') as writer:
|
| 178 |
df_total_vs_ev.to_excel(writer, index=False)
|