Spaces:
Running
Running
Jon Solow
commited on
Commit
·
32ac9a4
1
Parent(s):
acebb03
Remove depth charts and use team from ecr
Browse files
src/pages/3_Draft_View.py
CHANGED
|
@@ -85,6 +85,7 @@ def load_ecr_data():
|
|
| 85 |
"player_id",
|
| 86 |
"player_name",
|
| 87 |
"player_position_id",
|
|
|
|
| 88 |
"player_bye_week",
|
| 89 |
"rank_ecr",
|
| 90 |
"pos_rank",
|
|
@@ -126,9 +127,7 @@ def display_formatted_tiers(df):
|
|
| 126 |
"player_bye_week",
|
| 127 |
# "tier",
|
| 128 |
# "is_drafted",
|
| 129 |
-
"
|
| 130 |
-
"Depth Position",
|
| 131 |
-
"Source",
|
| 132 |
],
|
| 133 |
column_config={
|
| 134 |
"player_name": st.column_config.TextColumn(label="", help="Player's name"),
|
|
@@ -137,8 +136,7 @@ def display_formatted_tiers(df):
|
|
| 137 |
"rank_ecr": st.column_config.NumberColumn(label="Rank", help="Player ECR Rank"),
|
| 138 |
"tier": st.column_config.NumberColumn(label="Tier", help="Player Tier"),
|
| 139 |
"is_drafted": st.column_config.CheckboxColumn(label="Drafted", help="Has been drafted"),
|
| 140 |
-
"
|
| 141 |
-
"Source": st.column_config.TextColumn(label=""),
|
| 142 |
},
|
| 143 |
use_container_width=True,
|
| 144 |
)
|
|
@@ -188,8 +186,8 @@ def get_page():
|
|
| 188 |
)
|
| 189 |
ecr_with_draft["is_drafted"] = ecr_with_draft["fp_id"].notna()
|
| 190 |
|
| 191 |
-
depth_charts = load_depth_charts()
|
| 192 |
-
ecr_with_draft = ecr_with_draft.merge(depth_charts, how="left", left_on="player_id", right_on="fp_id")
|
| 193 |
|
| 194 |
if ("round" in ecr_with_draft) and ("pick" in ecr_with_draft):
|
| 195 |
draft_picks_only = ecr_with_draft[ecr_with_draft.is_drafted].sort_values(["round", "pick"])
|
|
@@ -212,7 +210,7 @@ def get_page():
|
|
| 212 |
filtered_data = filter_dataframe(
|
| 213 |
ecr_with_draft,
|
| 214 |
force_on=True,
|
| 215 |
-
force_on_columns=["is_drafted", "player_position_id", "
|
| 216 |
)
|
| 217 |
|
| 218 |
position_list = [
|
|
|
|
| 85 |
"player_id",
|
| 86 |
"player_name",
|
| 87 |
"player_position_id",
|
| 88 |
+
"player_team_id",
|
| 89 |
"player_bye_week",
|
| 90 |
"rank_ecr",
|
| 91 |
"pos_rank",
|
|
|
|
| 127 |
"player_bye_week",
|
| 128 |
# "tier",
|
| 129 |
# "is_drafted",
|
| 130 |
+
"player_team_id",
|
|
|
|
|
|
|
| 131 |
],
|
| 132 |
column_config={
|
| 133 |
"player_name": st.column_config.TextColumn(label="", help="Player's name"),
|
|
|
|
| 136 |
"rank_ecr": st.column_config.NumberColumn(label="Rank", help="Player ECR Rank"),
|
| 137 |
"tier": st.column_config.NumberColumn(label="Tier", help="Player Tier"),
|
| 138 |
"is_drafted": st.column_config.CheckboxColumn(label="Drafted", help="Has been drafted"),
|
| 139 |
+
"player_team_id": st.column_config.TextColumn(label="Tm"),
|
|
|
|
| 140 |
},
|
| 141 |
use_container_width=True,
|
| 142 |
)
|
|
|
|
| 186 |
)
|
| 187 |
ecr_with_draft["is_drafted"] = ecr_with_draft["fp_id"].notna()
|
| 188 |
|
| 189 |
+
# depth_charts = load_depth_charts()
|
| 190 |
+
# ecr_with_draft = ecr_with_draft.merge(depth_charts, how="left", left_on="player_id", right_on="fp_id")
|
| 191 |
|
| 192 |
if ("round" in ecr_with_draft) and ("pick" in ecr_with_draft):
|
| 193 |
draft_picks_only = ecr_with_draft[ecr_with_draft.is_drafted].sort_values(["round", "pick"])
|
|
|
|
| 210 |
filtered_data = filter_dataframe(
|
| 211 |
ecr_with_draft,
|
| 212 |
force_on=True,
|
| 213 |
+
force_on_columns=["is_drafted", "player_position_id", "player_team_id"],
|
| 214 |
)
|
| 215 |
|
| 216 |
position_list = [
|