Here’s a not so hypothetical scenario…
You have downloaded a CSV file of player salaries from DraftKings or FanDuel. You pull that information into Excel. Your goal is to take the “Opponent” information and use it to determine who each player’s opposing starting pitcher will be.
You have also followed this very brief set of instructions on how to get a list of starting pitchers into Excel that refreshes automatically each day (OK, not so brief).
The challenge is that the list of starters does not use the same team name system as the DFS salary information. This is but one example of this. If you ever try to combine information about MLB teams that comes from different web sites, you’ll likely find a number of other inconsistencies. Even the sites that use abbreviations (like the DFS info above), don’t use them consistently. Sometimes the Giants are “SF” and sometimes they’re “SFG”. The Nationals might be “WAS”, “WSN”, or “WSH”!
The Solution – a Team ID Map
To solve this problem, I have created an “MLB Team ID Map”. It’s similar in concept to the Player ID Map.
The map lays out the abbreviations (or team name, in Fangraphs’ case) from the following sites:
- Fangraphs
- Baseball Reference
- FanDuel
- DraftKings
- Yahoo!
- ESPN
- FantasyPros
- BaseballPress
- Baseball Prospectus
- Rotowire
Two Formats to Use the Team ID Map
The information is available in both a web page format (so you can web query it) and in an online CSV file (see instructions on how to use the CSV option later in this post).
Link to the Web Page Format:
https://www.smartfantasybaseball.com/TEAMMAPWEBPAGE
Link to the CSV File:
https://www.smartfantasybaseball.com/TEAMMAPLINK