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


  1. Write a Python script to scrape weekly scores (using the selenium web scraping package) for a given League ID and Year. Export to CSV.
  2. FF League History Dataset – Jupyter Notebook – R
    1. Union the exported tables into a single table.
    2. Add one-hot encoded columns for categorical variables (Wins, Regular Season, Playoff Rounds).
  3. FF History – Inverting Table – Jupyter Notebook – R
    1. Invert table so we can filter for all of one team’s matches using a single column.
    2. Export to CSV.
Completed dataset. Inverted row example in red.

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

Player Profile Dashboard, static screenshot.