Creating Player Profile Dashboard from Historical FFL Data
Problem
Our fantasy football league dates back to 2014, but ESPN’s fantasy sports platform doesn’t track any team histories or statistics. Can we collect, organize, and display past data in a way that is both easy to view and easy to interact with for users?
Collecting Data
- Write a Python script to scrape weekly scores (using the selenium web scraping package) for a given League ID and Year. Export to CSV.
- FF League History Dataset – Jupyter Notebook – R
- Union the exported tables into a single table.
- Add one-hot encoded columns for categorical variables (Wins, Regular Season, Playoff Rounds).
- FF History – Inverting Table – Jupyter Notebook – R
- Invert table so we can filter for all of one team’s matches using a single column.
- Export to CSV.
Creating a Solution
We can use our completed and formatted dataset as a data source in Tableau Public to create a Player Profile dashboard. Any user can easily use this dashboard to easily look up their overall and yearly statistics, as well as their head-to-head successes (or failures).
Player Profiles – Tableau Public