Get your Fantasy Football Trade Analyzer running in 5 minutes!
# Make the script executable (Linux/Mac)
chmod +x run_app.sh
# Run the app
./run_app.sh# Install dependencies
pip install -r requirements.txt
# Run the app
streamlit run app.pyThe app will open automatically in your browser at http://localhost:8501
- Go to sleeper.app
- Open your league
- Look at the URL:
https://sleeper.app/leagues/YOUR_LEAGUE_ID/team - Copy the
YOUR_LEAGUE_IDportion
- In the sidebar, paste your League ID
- Click outside the input box
- Wait for league data to load (5-10 seconds)
- Choose your team name from the dropdown
- View your roster with enhanced valuations
AI Trade Suggestions:
- Automatically generated based on your team needs
- Shows potential gains/losses
- Considers positional balance
Manual Trade Analyzer:
- Enter custom trades
- Get instant fairness verdicts
- See detailed value breakdowns
League Overview:
- Power rankings
- Compare against other teams
- Identify trading partners
The app works out-of-the-box with mock data:
- 200+ players with realistic projections
- All positions including IDP
- Full feature set available
Demo limitations:
- Synthetic data (not real NFL data)
- No historical trends
- Generic player details
For real NFL data, get a free SportsDataIO API key:
- Sign up at sportsdata.io
- Free tier: 1000 requests/month
- Open
app.py - Replace
API_KEY = "YOUR_SPORTSDATAIO_KEY_HERE"with your key - Restart the app
Benefits of real data:
- Actual NFL projections
- Historical performance (3 years)
- Real player ages and injury status
- Team performance metrics
- Strength of schedule analysis
Each player gets an "Adjusted Value" based on:
60% - Current projections (2026 season)
20% - Historical average (past 3 years)
10% - Team performance impact
5% - Strength of schedule
5% - Age & injury adjustments
Shows how much better a player is than a "replacement level" player:
- QB: Top 12
- RB: Top 24
- WR: Top 30
- TE: Top 12
- IDP varies by position
Higher VORP = more valuable player
Trades are evaluated as:
- ✅ Fair: Within ±5% value
- 🎉 Great for You: +10% or more
⚠️ Unfavorable: -10% or less- ⚖️ Slightly Imbalanced: Between ±5-10%
-
Check AI Suggestions First
- Pre-analyzed for mutual benefit
- Based on roster construction
- Considers positional needs
-
Look for Complementary Needs
- Your strength = their weakness
- Their strength = your weakness
- Win-win scenarios
-
Don't Overpay
- Aim for positive or neutral value
- Consider injury risk and age
- Think about playoffs
-
Position Scarcity
- RBs and TEs are often scarce
- May need to "overpay" slightly
- Balance is key
The analyzer fully supports IDP with:
- Tackles, sacks, interceptions
- Position-specific baselines
- Defensive player projections
IDP Positions:
- DL (Defensive Line): Prioritize sacks
- LB (Linebackers): High tackle volume
- DB (Defensive Backs): Interceptions + tackles
"Error fetching Sleeper users"
- Double-check your League ID
- Ensure the league is active
- Try refreshing the page
"Using mock data" warning
- This is normal without an API key
- All features still work
- Add API key for real data
Players not showing up
- Some players may not match between databases
- Fuzzy matching attempts to find closest match
- Very new players may be missing
Slow loading
- First load caches data (slower)
- Subsequent loads are faster
- API calls may take 10-30 seconds
-
Compare Multiple Trades
- Use manual analyzer for variations
- Try 2-for-1, 1-for-2 scenarios
- Consider package deals
-
Think Long-Term
- Age matters for ROS and beyond
- Injury history compounds risk
- Schedule gets easier/harder
-
League Context Matters
- Are you competing now or rebuilding?
- Do you need a specific position?
- Who else might trade with you?
-
Use Charts
- Position distribution shows balance
- Power rankings show standing
- Visual insights help decisions
-
Re-analyze Weekly
- Projections change
- Injuries happen
- New opportunities emerge
Once comfortable with basics:
- Customize Scoring - Edit
SCORING_WEIGHTSin app.py - Adjust Baselines - Match your league size
- Add ML Predictions - Train models on historical data
- Export Analysis - Save trade history and results
- Multi-League - Analyze multiple leagues
Use the analysis to:
- Propose trades to league mates
- Justify your trade offers
- Counter-offer with data
- Build trade packages
Q: Does this work for dynasty leagues? A: Yes! Age adjustments help with dynasty valuation. Future versions will add explicit keeper/dynasty modes.
Q: Can I use this for DFS? A: Not directly - this is designed for season-long leagues. But projections could inform DFS decisions.
Q: How accurate are the projections? A: With real API data, projections are from SportsDataIO (used by NFL teams). No projection is perfect, but these are industry-standard.
Q: Can I analyze trades that already happened? A: Yes! Use the manual analyzer to evaluate past trades and learn.
Q: Does it work for other platforms (ESPN, Yahoo)? A: Currently only Sleeper API is integrated. Manual entry works for any platform.
- Read
README_STREAMLIT.mdfor detailed documentation - Check
config_example.pyfor customization options - Review
app.pycode comments for technical details
Ready to dominate your league? Let's analyze some trades! 🏈