Spaces:
Sleeping
Sleeping
Update pages/1player_information.py
Browse files- pages/1player_information.py +0 -36
pages/1player_information.py
CHANGED
@@ -5,34 +5,6 @@ import seaborn as sns
|
|
5 |
|
6 |
# Set page configuration
|
7 |
st.set_page_config(page_title="Cricket Legends: Career Insights", layout="wide")
|
8 |
-
|
9 |
-
# Light-Themed Background
|
10 |
-
page_bg = """
|
11 |
-
<style>
|
12 |
-
body {
|
13 |
-
background-color: #f5f7fa;
|
14 |
-
}
|
15 |
-
[data-testid="stAppViewContainer"] {
|
16 |
-
background-color: #f5f7fa;
|
17 |
-
}
|
18 |
-
[data-testid="stSidebar"] {
|
19 |
-
background-color: #ffffff;
|
20 |
-
border-right: 1px solid #ddd;
|
21 |
-
}
|
22 |
-
h1, h2, h3, h4, h5, h6 {
|
23 |
-
color: #333333 !important;
|
24 |
-
}
|
25 |
-
.stTextInput>div>div>input {
|
26 |
-
background-color: white;
|
27 |
-
color: black;
|
28 |
-
border-radius: 5px;
|
29 |
-
padding: 10px;
|
30 |
-
border: 1px solid #ccc;
|
31 |
-
}
|
32 |
-
</style>
|
33 |
-
"""
|
34 |
-
st.markdown(page_bg, unsafe_allow_html=True)
|
35 |
-
|
36 |
# App Title
|
37 |
st.title("π Cricket Legends: Career Insights & Visualizations")
|
38 |
|
@@ -77,14 +49,6 @@ if player_input:
|
|
77 |
ax.set_title(f"Runs Scored by {selected_player}", fontsize=14)
|
78 |
st.pyplot(fig)
|
79 |
|
80 |
-
# Scatter Plot - Matches vs Runs (ODIs)
|
81 |
-
fig, ax = plt.subplots()
|
82 |
-
sns.scatterplot(x=df["Matches_ODI"], y=df["batting_Runs_ODI"], ax=ax, color="#4682B4", edgecolor='black')
|
83 |
-
ax.set_xlabel("Matches Played", fontsize=12)
|
84 |
-
ax.set_ylabel("Runs Scored", fontsize=12)
|
85 |
-
ax.set_title("Matches vs Runs in ODIs (All Players)", fontsize=14)
|
86 |
-
st.pyplot(fig)
|
87 |
-
|
88 |
# Line Chart - Batting Average Over Formats
|
89 |
batting_average = [
|
90 |
player_data["batting_Runs_Test"] / max(1, player_data["batting_Innings_Test"]),
|
|
|
5 |
|
6 |
# Set page configuration
|
7 |
st.set_page_config(page_title="Cricket Legends: Career Insights", layout="wide")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
# App Title
|
9 |
st.title("π Cricket Legends: Career Insights & Visualizations")
|
10 |
|
|
|
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 = [
|
54 |
player_data["batting_Runs_Test"] / max(1, player_data["batting_Innings_Test"]),
|