Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -217,34 +217,3 @@ elif show_bowling and not player_bowling.empty:
|
|
| 217 |
color_discrete_sequence=px.colors.qualitative.Bold) # High contrast for dark mode
|
| 218 |
st.plotly_chart(fig_bowl_wickets, use_container_width=True)
|
| 219 |
|
| 220 |
-
# ------------------------------
|
| 221 |
-
# Player Comparison Section
|
| 222 |
-
# ------------------------------
|
| 223 |
-
if compare_toggle and not player2_batting.empty and not player_batting.empty:
|
| 224 |
-
st.markdown("---")
|
| 225 |
-
st.header(f"π Comparing {player} vs {player2}")
|
| 226 |
-
|
| 227 |
-
st.subheader("π Batting Comparison")
|
| 228 |
-
bat_compare_df = pd.concat([
|
| 229 |
-
player_batting.assign(Player=player),
|
| 230 |
-
player2_batting.assign(Player=player2)
|
| 231 |
-
])
|
| 232 |
-
fig_compare_runs = px.bar(bat_compare_df, x="Format", y="Runs", color="Player", barmode="group",
|
| 233 |
-
title="Runs Comparison Across Formats")
|
| 234 |
-
fig_compare_sr = px.line(bat_compare_df, x="Format", y="SR", color="Player", markers=True,
|
| 235 |
-
title="Strike Rate Comparison")
|
| 236 |
-
st.plotly_chart(fig_compare_runs, use_container_width=True)
|
| 237 |
-
st.plotly_chart(fig_compare_sr, use_container_width=True)
|
| 238 |
-
|
| 239 |
-
if not player_bowling.empty and not player2_bowling.empty:
|
| 240 |
-
st.subheader("π― Bowling Comparison")
|
| 241 |
-
bowl_compare_df = pd.concat([
|
| 242 |
-
player_bowling.assign(Player=player),
|
| 243 |
-
player2_bowling.assign(Player=player2)
|
| 244 |
-
])
|
| 245 |
-
fig_compare_eco = px.line(bowl_compare_df, x="Format", y="Eco", color="Player", markers=True,
|
| 246 |
-
title="Economy Rate Comparison")
|
| 247 |
-
fig_compare_wkts = px.bar(bowl_compare_df, x="Format", y="Wickets", color="Player", barmode="group",
|
| 248 |
-
title="Wickets Comparison")
|
| 249 |
-
st.plotly_chart(fig_compare_eco, use_container_width=True)
|
| 250 |
-
st.plotly_chart(fig_compare_wkts, use_container_width=True)
|
|
|
|
| 217 |
color_discrete_sequence=px.colors.qualitative.Bold) # High contrast for dark mode
|
| 218 |
st.plotly_chart(fig_bowl_wickets, use_container_width=True)
|
| 219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|