-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
133 additions
and
92 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,72 +1,109 @@ | ||
# the following were created like so | ||
# import statsapi | ||
# teams = statsapi.get('teams', {'sportIds':1})['teams'] | ||
# | ||
# TEAM_FULL = {t['teamName']:t['name'] for t in teams} | ||
# TEAM_ABBR_LN = {t['name']:t['abbreviation'] for t in teams} | ||
# _teams = statsapi.get('teams', {'sportIds':1})['teams'] | ||
# TEAM_ID_ABBR = {t["id"]: t["abbreviation"] for t in _teams} | ||
# TEAM_ID_NAME = {t["id"]: t["teamName"] for t in _teams} | ||
# TEAM_NAME_ID = {t["teamName"]: t["id"] for t in _teams} | ||
|
||
TEAM_FULL = { | ||
"Athletics": "Oakland Athletics", | ||
"Pirates": "Pittsburgh Pirates", | ||
"Padres": "San Diego Padres", | ||
"Mariners": "Seattle Mariners", | ||
"Giants": "San Francisco Giants", | ||
"Cardinals": "St. Louis Cardinals", | ||
"Rays": "Tampa Bay Rays", | ||
"Rangers": "Texas Rangers", | ||
"Blue Jays": "Toronto Blue Jays", | ||
"Twins": "Minnesota Twins", | ||
"Phillies": "Philadelphia Phillies", | ||
"Braves": "Atlanta Braves", | ||
"White Sox": "Chicago White Sox", | ||
"Marlins": "Miami Marlins", | ||
"Yankees": "New York Yankees", | ||
"Brewers": "Milwaukee Brewers", | ||
"Angels": "Los Angeles Angels", | ||
"D-backs": "Arizona Diamondbacks", | ||
"Orioles": "Baltimore Orioles", | ||
"Red Sox": "Boston Red Sox", | ||
"Cubs": "Chicago Cubs", | ||
"Reds": "Cincinnati Reds", | ||
"Guardians": "Cleveland Guardians", | ||
"Rockies": "Colorado Rockies", | ||
"Tigers": "Detroit Tigers", | ||
"Astros": "Houston Astros", | ||
"Royals": "Kansas City Royals", | ||
"Dodgers": "Los Angeles Dodgers", | ||
"Nationals": "Washington Nationals", | ||
"Mets": "New York Mets", | ||
# Can be customized, but will require changing in colors/teams.json as well | ||
TEAM_ID_ABBR = { | ||
133: "OAK", | ||
134: "PIT", | ||
135: "SD", | ||
136: "SEA", | ||
137: "SF", | ||
138: "STL", | ||
139: "TB", | ||
140: "TEX", | ||
141: "TOR", | ||
142: "MIN", | ||
143: "PHI", | ||
144: "ATL", | ||
145: "CWS", | ||
146: "MIA", | ||
147: "NYY", | ||
158: "MIL", | ||
108: "LAA", | ||
109: "AZ", | ||
110: "BAL", | ||
111: "BOS", | ||
112: "CHC", | ||
113: "CIN", | ||
114: "CLE", | ||
115: "COL", | ||
116: "DET", | ||
117: "HOU", | ||
118: "KC", | ||
119: "LAD", | ||
120: "WSH", | ||
121: "NYM", | ||
} | ||
|
||
TEAM_ABBR_LN = { | ||
"Oakland Athletics": "OAK", | ||
"Pittsburgh Pirates": "PIT", | ||
"San Diego Padres": "SD", | ||
"Seattle Mariners": "SEA", | ||
"San Francisco Giants": "SF", | ||
"St. Louis Cardinals": "STL", | ||
"Tampa Bay Rays": "TB", | ||
"Texas Rangers": "TEX", | ||
"Toronto Blue Jays": "TOR", | ||
"Minnesota Twins": "MIN", | ||
"Philadelphia Phillies": "PHI", | ||
"Atlanta Braves": "ATL", | ||
"Chicago White Sox": "CWS", | ||
"Miami Marlins": "MIA", | ||
"New York Yankees": "NYY", | ||
"Milwaukee Brewers": "MIL", | ||
"Los Angeles Angels": "LAA", | ||
"Arizona Diamondbacks": "AZ", | ||
"Baltimore Orioles": "BAL", | ||
"Boston Red Sox": "BOS", | ||
"Chicago Cubs": "CHC", | ||
"Cincinnati Reds": "CIN", | ||
"Cleveland Guardians": "CLE", | ||
"Colorado Rockies": "COL", | ||
"Detroit Tigers": "DET", | ||
"Houston Astros": "HOU", | ||
"Kansas City Royals": "KC", | ||
"Los Angeles Dodgers": "LAD", | ||
"Washington Nationals": "WSH", | ||
"New York Mets": "NYM", | ||
# Can be customized | ||
TEAM_ID_NAME = { | ||
133: "Athletics", | ||
134: "Pirates", | ||
135: "Padres", | ||
136: "Mariners", | ||
137: "Giants", | ||
138: "Cardinals", | ||
139: "Rays", | ||
140: "Rangers", | ||
141: "Blue Jays", | ||
142: "Twins", | ||
143: "Phillies", | ||
144: "Braves", | ||
145: "White Sox", | ||
146: "Marlins", | ||
147: "Yankees", | ||
158: "Brewers", | ||
108: "Angels", | ||
109: "D-backs", | ||
110: "Orioles", | ||
111: "Red Sox", | ||
112: "Cubs", | ||
113: "Reds", | ||
114: "Guardians", | ||
115: "Rockies", | ||
116: "Tigers", | ||
117: "Astros", | ||
118: "Royals", | ||
119: "Dodgers", | ||
120: "Nationals", | ||
121: "Mets", | ||
} | ||
|
||
|
||
# Can be customized, but names in the config.json file must match | ||
TEAM_NAME_ID = { | ||
"Athletics": 133, | ||
"Pirates": 134, | ||
"Padres": 135, | ||
"Mariners": 136, | ||
"Giants": 137, | ||
"Cardinals": 138, | ||
"Rays": 139, | ||
"Rangers": 140, | ||
"Blue Jays": 141, | ||
"Twins": 142, | ||
"Phillies": 143, | ||
"Braves": 144, | ||
"White Sox": 145, | ||
"Marlins": 146, | ||
"Yankees": 147, | ||
"Brewers": 158, | ||
"Angels": 108, | ||
"D-backs": 109, | ||
"Orioles": 110, | ||
"Red Sox": 111, | ||
"Cubs": 112, | ||
"Reds": 113, | ||
"Guardians": 114, | ||
"Rockies": 115, | ||
"Tigers": 116, | ||
"Astros": 117, | ||
"Royals": 118, | ||
"Dodgers": 119, | ||
"Nationals": 120, | ||
"Mets": 121, | ||
} |
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