Gist beac8531ee8bb5520c9a42f87e680e7a
✓ Published0🌍 Public
CConorAspell
Last edited Dec 5, 2023
Created on Dec 5, 2023
This example shows how a Fantasy Premier League team is automatically updated each gameweek, selecting starters and substitutes based on player form and difficulty. The code calculates a starting weight for each player by combining their recent form and fixture difficulty, then sorts the squad to pick the strongest starting lineup. It uses pandas DataFrames to manipulate player data, boto3 to interact with S3 buckets, and AWS Lambda to run the logic as a serverless function. The final team sheet, including captain and vice-captain assignments, is uploaded as JSON for later retrieval.
AI-generated description