Spaces:
Sleeping
Sleeping
Update pages/1player_information.py
Browse files- pages/1player_information.py +0 -19
pages/1player_information.py
CHANGED
@@ -48,15 +48,6 @@ if player_input:
|
|
48 |
ax.set_ylabel("Runs Scored", fontsize=12)
|
49 |
ax.set_title(f"Runs Scored by {selected_player}", fontsize=14)
|
50 |
st.pyplot(fig)
|
51 |
-
# Scatter Plot - Matches vs Runs
|
52 |
-
fig, ax = plt.subplots()
|
53 |
-
sns.scatterplot(x=[player_data["Matches_ODI"]],
|
54 |
-
y=[player_data["batting_Runs_ODI"]],
|
55 |
-
color="#4682B4", edgecolor='black', s=200)
|
56 |
-
ax.set_xlabel("Matches Played", fontsize=12)
|
57 |
-
ax.set_ylabel("Runs Scored", fontsize=12)
|
58 |
-
ax.set_title(f"Matches vs Runs in ODIs - {selected_player}", fontsize=14)
|
59 |
-
st.pyplot(fig)
|
60 |
|
61 |
# Line Chart - Batting Average Over Formats
|
62 |
batting_average = [
|
@@ -70,15 +61,5 @@ if player_input:
|
|
70 |
ax.set_ylabel("Batting Average", fontsize=12)
|
71 |
ax.set_title(f"Batting Average of {selected_player}", fontsize=14)
|
72 |
st.pyplot(fig)
|
73 |
-
|
74 |
-
# Histogram - Distribution of Runs Scored by All Players in ODIs
|
75 |
-
fig, ax = plt.subplots()
|
76 |
-
sns.histplot(df["batting_Runs_ODI"], bins=20, kde=True, color='#3CB371', ax=ax)
|
77 |
-
ax.set_xlabel("Runs Scored", fontsize=12)
|
78 |
-
ax.set_ylabel("Frequency", fontsize=12)
|
79 |
-
ax.set_title("Distribution of Runs Scored in ODIs (All Players)", fontsize=14)
|
80 |
-
st.pyplot(fig)
|
81 |
-
|
82 |
-
|
83 |
else:
|
84 |
st.error("🚨 Player not found! Please enter a valid player name.")
|
|
|
48 |
ax.set_ylabel("Runs Scored", fontsize=12)
|
49 |
ax.set_title(f"Runs Scored by {selected_player}", fontsize=14)
|
50 |
st.pyplot(fig)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
# Line Chart - Batting Average Over Formats
|
53 |
batting_average = [
|
|
|
61 |
ax.set_ylabel("Batting Average", fontsize=12)
|
62 |
ax.set_title(f"Batting Average of {selected_player}", fontsize=14)
|
63 |
st.pyplot(fig)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
else:
|
65 |
st.error("🚨 Player not found! Please enter a valid player name.")
|