Gist c444e6c65326dabb5f6b4c25f5a455d6
✓ Published0🌍 Public
CConorAspell
Last edited Dec 11, 2023
Created on Dec 5, 2023
This visualization demonstrates a Fantasy Premier League (FPL) team selection process, showing how player data is analyzed to determine which player to transfer out each gameweek. The code uses pandas DataFrames to calculate a weighted "out weight" for each player based on their form, difficulty (diff), and position, then randomly selects a player to drop using the `sample()` method with these weights. It leverages the `fpl_utils` library to fetch team data, retrieve player statistics from an S3 bucket, and upload the result as JSON. The underlying data comes from CSV files containing player gameweek statistics, with the output stored for future gameweek planning.
AI-generated description