23 NFL Data

Please make sure you can load and use the NFL data. You can get the data from:

https://www.kaggle.com/datasets/maxhorowitz/nflplaybyplay2009to2016?resource=download

I have also put the data on Brightspace if that helps you.

For Friday, please try to answer these questions:

  • Which game had the most plays?
  • How many plays?
  • Which teams played in this game?
  • How many plays if you remove the “No Play” plays?
  • Highest scoring game (total points including both teams)?
  • How many plays were in this game?

23.1 Additional practice

  1. Create a new small data set called small that only uses game_id’s that are less than 2010000000 and the variables game_id, home_team, total_home_score, away_team, total_away_score, and play_type. How many rows do you get in this data set? I get 41,880.

  2. How many plays are in the game 2009111507? I get 167.

  3. For small how many plays are kick offs? I get 2327.

  4. For game 2009111507 how many plays are kick offs? I get 10.

  5. For small how many plays are qb kneels or qb spikes? I get 425.

  6. For small how many what is the percentage of run to pass plays excluding all other types of plays? I get 43.15482% running.

  7. In small, which game has the most passing plays? I get game 2009122006 with 101 passing plays.