In this post, we use a Shiny app in R to determine the best possible players to pick in a fantasy football auction draft. The app includes the most accurate fantasy football projections available, and calculates a robust average of more sources of projections than any other website (see here for a list of the sources of projections). You can even choose how much weight to give each source. Based on your league settings, it determines which players you should draft to maximize your starting lineup’s projected points. It also allows you to change your risk tolerance to avoid picking risky players. Best of all, the app updates the selections automatically with your inputs, and you can download the data for yourself. So let’s get to it. Here’s a more thorough description:
How it Works
First, we use a script to scrape player’s projected points from numerous sources using R. Second, we scrape average auction values from various sources. Third, based on the user’s league scoring settings, we calculate players’ projections using an average of the analysts’ projections (by default, the sources are weighted according to historical accuracy). You can choose which projection sources to include, modify the weights, and choose to calculate a mean, weighted average, or robust average. A robust average is less affected by outliers (crazy projections). Fourth, we calculate players’ risk levels, as defined by the average of: 1) injury risk from Sports Injury Predictor, and 2) the standard deviation of the players’ projected points and rankings across analysts. Note that risk is standardized to have a mean of 5 and a standard deviation of 2. Fifth, we calculate the value of each player over a typical replacement player at his position (VOR) to determine player rankings.
Sixth, we take players’ average auction values (AAV) from the source you select (e.g., Yahoo, ESPN), and adjust them based on the league cap and the number of teams in your league. Seventh, we calculate a player’s cost by deflating/inflating the adjusted AAV according to your inputs. Consistent with a Harvard analysis on the optimal draft strategy, by default, we apply a 10% premium to the top players and a 10% discount to the lower-tiered players. According to the study, the majority of one’s excess cap should be spent on the starting lineup, and you should spend less on bench players. This is because bench players do not contribute much to the team’s projected points. Although bench players are important in the case of a starter’s injury or under-performance, it is generally best to draft starters with minimal risk to ensure solid, if not superior, performance. On the other hand, one should accept more risk with bench players because such a move has a low risk, high reward potential. This 10% adjustment results in a (projected) cost that reflects the cost you can expect and should be willing to pay for a player if he is selected by the optimizer. Note: The projected costs don’t always map onto the projected points because the projected cost is derived from the AAV of the site you selected and not the projected points. That’s because your draft costs will be in large part driven by your site’s AAV, which greatly influences what other people in your league will be willing to pay for each player.
Then, based on how many starters you need for each position, your cap available, the players already drafted, and your maximum risk tolerance, we use the Rglpk package to find your optimal starting lineup by selecting the remaining players available that maximize the starting lineup’s sum of projected points while meeting all of the constraints. For a similar execution using Excel’s Solver function, see here.
We also display the “dropoff” in projected points for the next best 2 players at the same position. If a player has a high dropoff, you should consider targeting him because that position drops in value very quickly. For more info on how projected cost is calculated, see here.
Note on risk: although bench players are important in the case of a starter’s injury or under-performance, it is generally best to draft starters with minimal risk to ensure solid, if not superior, performance. On the other hand, one should accept more risk with bench players because such a move has a low risk, high reward potential. For bench players, value over replacement may be less important than a player’s upside. We include players’ upside potential (ceiling) in the output, as defined by the players’ 90th percentile of their projected points across analysts.
Note on VOR: you may notice that the top Defenses and Kickers have a negative VOR value. Why? We added a penalty to the VOR values for DSTs and Kickers to make the rankings more realistic and to reflect the fact that DSTs and Kickers are the least predictable. The penalty was based on where the DST and Kickers were placed before penalty. The Kickers were about 17–20 points over where the Expert Consensus Ranking (ECR) would have placed them and DSTs were 5–7 points over, so the VOR penalty is -18 for Kickers is -6 for DSTs.
- Draft your offensive starting lineup first before drafting bench players. Spend less on Kickers and Defenses because they are less predictable and score fewer points.
- Spend most (or even all) of your cap on starters. A Harvard analysis showed that most people over-spend on bench players and under-spend on key starters. Bench players only benefit your team if a starter gets injured or they outperform a starter. In a standard league, 1500 points would likely put you in the top 10% of teams. Your goal is to maximize your starting lineup’s projected points, as discussed in the next item.
- For starters, pick the players with the highest sum of projected points (especially floor), while minimizing risk (i.e., a low risk and a high floor).
- For bench players, pick the players with a high ceiling. That way, one or more of your bench players has a chance to outperform your starters or be a solid replacement if your starters get injured. You should be willing to accept a higher risk for bench players than for starters.
- Give players more weight if they have a high dropoff (the player is projected to score many more points than the next best players at the same position)
Season: which season of projections to use.
Week: which week(s) of projections to use.
Number of Teams: the number of teams in your league.
League Cap: the cap available for each team at the beginning of the draft.
Cap Reserved for Bench: how much cap to reserve for your bench players.
Total Players on Roster: the total number of players on roster, including bench players.
Number of Starters by Position: how many players in your starting lineup at each position.
High Rank: the rank of the highest tier of players for inflating costs.
Low Rank: the rank of the lowest tier of players for deflating costs.
High Rank Cost Multiplier: the inflation/deflation multiplier for players with a High Rank (or higher).
Mid Rank Cost Multiplier: the inflation/deflation multiplier for players with between the High Rank and Low Rank.
Low Rank Cost Multiplier: the inflation/deflation multiplier for players with a Low Rank (or lower).
AAV: source of average auction values.
League Scoring: source of scoring settings.
Positions: which positions of players to include in calculations.
VOR Baseline: the position rank set to be the “typical replacement player” for each position. We set the default baseline VOR value as the number of players drafted at each position within the top 100 picks, based on ADP on MyFantasyLeague.com. You can modify the VOR baseline values. For info on how to select a typical replacement for each position, see here.
Impute Replacement-Level Points for Missed Games: Select yes to add points of the “typical replacement player” for each game a player is expected to miss due to suspensions. For example, if Player X is projected for 180 points over 12 of a possible 16 games, and our calculation determines 10 points per game as replacement-level production, the points column will show 220 points (180 + 4*10). Select no to avoid imputing replacement-level points for missed games. Projected number of games missed comes from ProFootballFocus.com.
Calculation Type: the type of average to calculate: mean, weighted average, or robust average. By default, a weighted average is used with analysts weighted by their historical accuracy. You can modify the weights in the weighted average. The mean is equivalent to a weighted average where all analysts are equally weighted (weight = 1). The robust average gives less weight to outliers (crazy projections).
Analysts: Select which analysts to include and, if weighted average, the weights for each analyst (i.e., how much weight to give each source of projections when calculating projected points). For instance, if you want to exclude ESPN projections, you would give them a weight of 0. If you want to give Yahoo projections twice the weight of CBS, you would give Yahoo a weight of 2 and CBS a weight of 1. The default weights reflect historical accuracy (higher = more accurate). Note that FantasyPros shows a default weight of zero because we already include all of their sources in our projections, so it would be double counting to give them a weight above 0. You can certainly do so, though, if you’d like. FantasyFootballNerd also shows a default weight of zero because it uses the same projections as FantasyData.
Scoring Settings: specify the number of points for each statistical category and position.
Maximum Risk Tolerance: Selects the maximum risk allowed for any player to be considered for inclusion in the optimal starting lineup. Players’ risk levels have a mean of 5 and a standard deviation of 2 (see below for more info on how risk is calculated).
Remaining Cap for Starters: How much cap you have remaining to spend on starters.
Players You Drafted: Select all players you’ve already drafted (click “Pick” button next to player or type player’s name).
Other Players Drafted: Select all players that other teams have drafted (click player’s name or type player’s name).
Lineup with Highest Points: Players with highest sum of projected points within your league cap and risk tolerance.
Lineup with Highest Floor: Players with highest sum of projected floor within your league cap and risk tolerance.
Lineup with Highest Ceiling: Players with highest sum of projected ceiling within your league cap and risk tolerance.
Pick: Click “Pick” button next to player to add to “Players You Drafted”.
Rank: Overall rank by VOR
Player (Team): Player name and team. Click player’s name to add to “Other Players Drafted”.
VOR: Value Over Typical Replacement Player. Used to rank players across positions. Calculated by comparing players’ projected points to a “typical” replacement player at the same position (determined by VOR baseline values). For more info on how VOR is calculated, see here.
Points: Average projected points for a player across analysts.
Ceiling: A player’s upside, calculated as the 90th percentile of a player’s projected points across analysts.
Floor: A player’s downside, calculated as the 10th percentile of a player’s projected points across analysts.
ECR Rank: Expert Consensus Ranking from FantasyPros.
Pos Rank: Position rank.
AAV: Average auction value.
Dropoff: The “dropoff” in projected points for the next best 2 players at the same position.
Risk: Risk of injury and degree of uncertainty of players’ projected points, calculated as the average of: 1) injury risk from Sports Injury Predictor, and 2) the standard deviation of the players’ projected points and rankings across analysts. Standardized within position to have a mean of 5 and a standard deviation of 2 (higher values reflect greater risk).
Displays two types of graphs:
- A density plot of projected points by analyst
- Line plot of each optimal starting lineup by projected points, floor, and ceiling
A density plot shows, for each analyst, what proportion of players are projected to score a given number of points. Density plots can be helpful for comparing analysts and finding analysts with wildly different projections. In the line plots, the dot represents the average (mean, weighted average, or robust average) estimate of projected points for each player. The line shows the range from a player’s floor to ceiling.
The Auction Draft Optimizer App
For the Auction Draft Optimizer app, go to: