This repository has been archived by the owner on Jun 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from JLpython-py/leaders/WARLeaderboards
Leaders/WARleaderboards
- Loading branch information
Showing
8 changed files
with
419 additions
and
315 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! python3 | ||
# FanGraphs/selectors/leaders_sel/__init__.py | ||
|
||
from . import major_league_leaderboards as mll | ||
from . import splits_leaderboards as splits | ||
from . import season_stat_grid as ssg | ||
from . import game_span_leaderboards as gsl | ||
from . import war_leaderboards as war |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#! python3 | ||
# FanGraphs/selectors/leaders_sel.game_span_leaderboards.py | ||
|
||
selections = { | ||
"stat": [ | ||
".controls-stats > .fgButton:nth-child(1)", | ||
".controls-stats > .fgButton:nth-child(2)" | ||
], | ||
"type": [ | ||
".controls-board-view > .fgButton:nth-child(1)", | ||
".controls-board-view > .fgButton:nth-child(2)", | ||
".controls-board-view > .fgButton:nth-child(3)" | ||
] | ||
} | ||
dropdowns = { | ||
"min_pa": ".controls-stats:nth-child(1) > div:nth-child(3) > .fg-selection-box__selection", | ||
"single_season": ".controls-stats:nth-child(2) > div:nth-child(1) > .fg-selection-box__selection", | ||
"season1": ".controls-stats:nth-child(2) > div:nth-child(2) > .fg-selection-box__selection", | ||
"season2": ".controls-stats:nth-child(2) > div:nth-child(3) > .fg-selection-box__selection", | ||
"determine": ".controls-stats.stat-determined > div:nth-child(1) > .fg-selection-box__selection" | ||
} | ||
waitfor = ".fg-data-grid.table-type" |
44 changes: 44 additions & 0 deletions
44
FanGraphs/selectors/leaders_sel/major_league_leaderboards.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#! python3 | ||
# FanGraphs/selectors/leaders_sel/major_league_leaderboards.py | ||
|
||
selections = { | ||
"group": "#LeaderBoard1_tsGroup", | ||
"stat": "#LeaderBoard1_tsStats", | ||
"position": "#LeaderBoard1_tsPosition", | ||
"type": "#LeaderBoard1_tsType" | ||
} | ||
dropdowns = { | ||
"league": "#LeaderBoard1_rcbLeague_Input", | ||
"team": "#LeaderBoard1_rcbTeam_Input", | ||
"single_season": "#LeaderBoard1_rcbSeason_Input", | ||
"split": "#LeaderBoard1_rcbMonth_Input", | ||
"min_pa": "#LeaderBoard1_rcbMin_Input", | ||
"season1": "#LeaderBoard1_rcbSeason1_Input", | ||
"season2": "#LeaderBoard1_rcbSeason2_Input", | ||
"age1": "#LeaderBoard1_rcbAge1_Input", | ||
"age2": "#LeaderBoard1_rcbAge2_Input" | ||
} | ||
dropdown_options = { | ||
"league": "#LeaderBoard1_rcbLeague_DropDown", | ||
"team": "#LeaderBoard1_rcbTeam_DropDown", | ||
"single_season": "#LeaderBoard1_rcbSeason_DropDown", | ||
"split": "#LeaderBoard1_rcbMonth_DropDown", | ||
"min_pa": "#LeaderBoard1_rcbMin_DropDown", | ||
"season1": "#LeaderBoard1_rcbSeason1_DropDown", | ||
"season2": "#LeaderBoard1_rcbSeason2_DropDown", | ||
"age1": "#LeaderBoard1_rcbAge1_DropDown", | ||
"age2": "#LeaderBoard1_rcbAge2_DropDown" | ||
} | ||
checkboxes = { | ||
"split_teams": "#LeaderBoard1_cbTeams", | ||
"active_roster": "#LeaderBoard1_cbActive", | ||
"hof": "#LeaderBoard1_cbHOF", | ||
"split_seasons": "#LeaderBoard1_cbSeason", | ||
"rookies": "#LeaderBoard1_cbRookie" | ||
} | ||
buttons = { | ||
"season1": "#LeaderBoard1_btnMSeason", | ||
"season2": "#LeaderBoard1_btnMSeason", | ||
"age1": "#LeaderBoard1_cmdAge", | ||
"age2": "#LeaderBoard1_cmdAge" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! python3 | ||
# FanGraphs/selectors/leaders_sel/season_stat_grid.py | ||
|
||
selections = { | ||
"stat": [ | ||
"div[class*='fgButton button-green']:nth-child(1)", | ||
"div[class*='fgButton button-green']:nth-child(2)" | ||
], | ||
"type": [ | ||
"div[class*='fgButton button-green']:nth-child(4)", | ||
"div[class*='fgButton button-green']:nth-child(5)", | ||
"div[class*='fgButton button-green']:nth-child(6)" | ||
] | ||
} | ||
dropdowns = { | ||
"start_season": ".row-season > div:nth-child(2)", | ||
"end_season": ".row-season > div:nth-child(4)", | ||
"popular": ".season-grid-controls-dropdown-row-stats > div:nth-child(1)", | ||
"standard": ".season-grid-controls-dropdown-row-stats > div:nth-child(2)", | ||
"advanced": ".season-grid-controls-dropdown-row-stats > div:nth-child(3)", | ||
"statcast": ".season-grid-controls-dropdown-row-stats > div:nth-child(4)", | ||
"batted_ball": ".season-grid-controls-dropdown-row-stats > div:nth-child(5)", | ||
"win_probability": ".season-grid-controls-dropdown-row-stats > div:nth-child(6)", | ||
"pitch_type": ".season-grid-controls-dropdown-row-stats > div:nth-child(7)", | ||
"plate_discipline": ".season-grid-controls-dropdown-row-stats > div:nth-child(8)", | ||
"value": ".season-grid-controls-dropdown-row-stats > div:nth-child(9)" | ||
} | ||
waitfor = ".fg-data-grid.undefined" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#! python3 | ||
# FanGraphs/selectors/leaders_sel/splits_leaderboards.py | ||
|
||
selections = { | ||
"group": [ | ||
".fgBin.row-button > div[class*='button-green fgButton']:nth-child(1)", | ||
".fgBin.row-button > div[class*='button-green fgButton']:nth-child(2)", | ||
".fgBin.row-button > div[class*='button-green fgButton']:nth-child(3)", | ||
".fgBin.row-button > div[class*='button-green fgButton']:nth-child(4)" | ||
], | ||
"stat": [ | ||
".fgBin.row-button > div[class*='button-green fgButton']:nth-child(6)", | ||
".fgBin.row-button > div[class*='button-green fgButton']:nth-child(7)" | ||
], | ||
"type": [ | ||
"#root-buttons-stats > div:nth-child(1)", | ||
"#root-buttons-stats > div:nth-child(2)", | ||
"#root-buttons-stats > div:nth-child(3)" | ||
] | ||
} | ||
dropdowns = { | ||
"time_filter": "#root-menu-time-filter > .fg-dropdown.splits.multi-choice", | ||
"preset_range": "#root-menu-time-filter > .fg-dropdown.splits.single-choice", | ||
"groupby": ".fg-dropdown.group-by" | ||
} | ||
splits = { | ||
"handedness": ".fgBin:nth-child(1) > .fg-dropdown.splits.multi-choice:nth-child(1)", | ||
"home_away": ".fgBin:nth-child(1) > .fg-dropdown.splits.multi-choice:nth-child(2)", | ||
"batted_ball": ".fgBin:nth-child(1) > .fg-dropdown.splits.multi-choice:nth-child(3)", | ||
"situation": ".fgBin:nth-child(1) > .fg-dropdown.splits.multi-choice:nth-child(4)", | ||
"count": ".fgBin:nth-child(1) > .fg-dropdown.splits.multi-choice:nth-child(5)", | ||
"batting_order": ".fgBin:nth-child(2) > .fg-dropdown.splits.multi-choice:nth-child(1)", | ||
"position": ".fgBin:nth-child(2) > .fg-dropdown.splits.multi-choice:nth-child(2)", | ||
"inning": ".fgBin:nth-child(2) > .fg-dropdown.splits.multi-choice:nth-child(3)", | ||
"leverage": ".fgBin:nth-child(2) > .fg-dropdown.splits.multi-choice:nth-child(4)", | ||
"shifts": ".fgBin:nth-child(2) > .fg-dropdown.splits.multi-choice:nth-child(5)", | ||
"team": ".fgBin:nth-child(3) > .fg-dropdown.splits.multi-choice:nth-child(1)", | ||
"opponent": ".fgBin:nth-child(3) > .fg-dropdown.splits.multi-choice:nth-child(2)", | ||
} | ||
quick_splits = { | ||
"batting_home": ".quick-splits > div:nth-child(1) > div:nth-child(2) > .fgButton:nth-child(1)", | ||
"batting_away": ".quick-splits > div:nth-child(1) > div:nth-child(2) > .fgButton:nth-child(2)", | ||
"vs_lhp": ".quick-splits > div:nth-child(1) > div:nth-child(3) > .fgButton:nth-child(1)", | ||
"vs_lhp_home": ".quick-splits > div:nth-child(1) > div:nth-child(3) > .fgButton:nth-child(2)", | ||
"vs_lhp_away": ".quick-splits > div:nth-child(1) > div:nth-child(3) > .fgButton:nth-child(3)", | ||
"vs_lhp_as_lhh": ".quick-splits > div:nth-child(1) > div:nth-child(3) > .fgButton:nth-child(4)", | ||
"vs_lhp_as_rhh": ".quick-splits > div:nth-child(1) > div:nth-child(3) > .fgButton:nth-child(5)", | ||
"vs_rhp": ".quick-splits > div:nth-child(1) > div:nth-child(4) > .fgButton:nth-child(1)", | ||
"vs_rhp_home": ".quick-splits > div:nth-child(1) > div:nth-child(4) > .fgButton:nth-child(2)", | ||
"vs_rhp_away": ".quick-splits > div:nth-child(1) > div:nth-child(4) > .fgButton:nth-child(3)", | ||
"vs_rhp_as_lhh": ".quick-splits > div:nth-child(1) > div:nth-child(4) > .fgButton:nth-child(4)", | ||
"vs_rhp_as_rhh": ".quick-splits > div:nth-child(1) > div:nth-child(4) > .fgButton:nth-child(5)", | ||
"pitching_as_sp": ".quick-splits > div:nth-child(2) > div:nth-child(1) .fgButton:nth-child(1)", | ||
"pitching_as_rp": ".quick-splits > div:nth-child(2) > div:nth-child(1) .fgButton:nth-child(2)", | ||
"pitching_home": ".quick-splits > div:nth-child(2) > div:nth-child(2) > .fgButton:nth-child(1)", | ||
"pitching_away": ".quick-splits > div:nth-child(2) > div:nth-child(2) > .fgButton:nth-child(2)", | ||
"vs_lhh": ".quick-splits > div:nth-child(2) > div:nth-child(3) > .fgButton:nth-child(1)", | ||
"vs_lhh_home": ".quick-splits > div:nth-child(2) > div:nth-child(3) > .fgButton:nth-child(2)", | ||
"vs_lhh_away": ".quick-splits > div:nth-child(2) > div:nth-child(3) > .fgButton:nth-child(3)", | ||
"vs_lhh_as_rhp": ".quick-splits > div:nth-child(2) > div:nth-child(3) > .fgButton:nth-child(4)", | ||
"vs_lhh_as_lhp": ".quick-splits > div:nth-child(2) > div:nth-child(3) > .fgButton:nth-child(5)", | ||
"vs_rhh": ".quick-splits > div:nth-child(2) > div:nth-child(4) > .fgButton:nth-child(1)", | ||
"vs_rhh_home": ".quick-splits > div:nth-child(2) > div:nth-child(4) > .fgButton:nth-child(1)", | ||
"vs_rhh_away": ".quick-splits > div:nth-child(2) > div:nth-child(4) > .fgButton:nth-child(1)", | ||
"vs_rhh_as_rhp": ".quick-splits > div:nth-child(2) > div:nth-child(4) > .fgButton:nth-child(1)", | ||
"vs_rhh_as_lhp": ".quick-splits > div:nth-child(2) > div:nth-child(4) > .fgButton:nth-child(1)" | ||
} | ||
switches = { | ||
"split_teams": "#stack-buttons > div:nth-child(2)", | ||
"auto_pt": "#stack-buttons > div:nth-child(3)" | ||
} | ||
waitfor = ".fg-data-grid.undefined" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! python3 | ||
# FanGraphs/selectors/leaders_sel/war_leaderboards.py | ||
|
||
dropdowns = { | ||
"season": "#WARBoard1_rcbSeason_Input", | ||
"team": "#WARBoard1_rcbTeam_Input", | ||
"type": "#WARBoard1_rcbType_Input" | ||
} | ||
dropdown_options = { | ||
"season": "#WARBoard1_rcbSeason_DropDown", | ||
"team": "#WARBoard1_rcbTeam_DropDown", | ||
"type": "#WARBoard1_rcbType_DropDown" | ||
} | ||
waitfor = ".rgMasterTable" |
Oops, something went wrong.