Skip to main content
100%

team_change_recommender.py

✓ Published0🌍 Public
CConorAspell
Last edited May 12, 2022
Created on May 11, 2022

This example shows a fantasy Premier League team-change recommender that identifies the best player to transfer out and the strongest replacement for a given team. The code calculates a weight for each player on the current roster, combining form, difficulty, chance of playing, and position, then selects the lowest-weight player to drop. It similarly scores all available players at the same position within budget and picks the highest-weight candidate. The tool pulls live data from the Fantasy Premier League API using `requests` and processes it with `pandas`, while the lambda handler returns a simple text result like "Player A -> Player B".

AI-generated description

Similar vizzes