nflfastR-Python-Tutorial

nflfastR Python

click any icon to visit its respective page!

CLICK HERE to visit the tutorial!

About this tutorial

This tutorial goes over how to work with nflfastR data in Python and concludes four parts:

  • Part 1 - Importing Packages and Scraping the Data

    • Overview of the core python data science packages
    • How to scrape nflfastR data
  • Part 2 - Getting to Know the Data

    • Basic pandas methods
    • Data cleaning
  • Part 3 - Basic Data Manipulation

    • Subsetting/querying overview
    • Using the data to compute important fantasy metrics
      • Air yards data
      • Redzone targets
      • Carries inside the 5
    • Calculating fantasy points for every play along with player totals
    • One-Hot Encoding
  • Part 4 - Data Viz! 📊

    • Basic viz with fantasy relevant data
    • Advanced viz using a function to show air yards distributions for any player

Resources used

Python pandas matplotlib Seaborn numpy Colab nflfastR

Special thank yous

nflfastR OSF benbaldwin mrcaseb deryck


Click here to visit the nflfastR documentation

Thanks for checking out the tutorial, I hope you enjoy!

By: Max Bolger @mnpykings, 2020

pykings