Learn R Programming

nflscrapR (version 1.4.0)

drive_summary: Drive Summary and Results

Description

This function outputs the results dataframe of each drive of a given game

Usage

drive_summary(GameID)

Arguments

GameID

(character or numeric) A 10 digit game ID associated with a given NFL game.

Value

A dataframe that has the summary statistics for each drive final output includes first downs, drive result, penalty yards, of plays, time of possession, quarter at the start of the drive, time at start of drive, yardline at start of drive, team with possession at start, end of drive quarter, end of drive time, end of drive yard line, end of drive team with possession

Details

The resulting dataframe has 16 variables associated with a specific aspect of a drive including the scoring result, number of plays, the duration of the drive, and the offensive and defensive teams. All 16 variables are explained in more detail below:

  • "GameID" - The ID of the given Game

  • DriveNumber" - The respective drive number in the game

  • "posteam" - The offensive team on the drive

  • "qtr" - The quarter at the end of the drive

  • "fds" - Number of first downs in the drive

  • "result" - End result of the drive

  • "penyds" - Net penalty yards of the drive for the offensive team

  • "ydsgained" - Number of yards gained on the drive

  • "numplays" - Number of plays on the drive

  • "postime" - The duration of the drive

  • "StartQrt" - The quarter at the beginning of the drive

  • "StartTime - The time left in the quarter at the start of the drive

  • "StartYardln" - Yardline at the start of the drive

  • "StartTeam" - The offensive team on the drive

  • "EndQrt" - The quarter at the end of the drive

  • "EndTime - The time left in the quarter at the end of the drive

  • "EndYardln" - Yardline at the end of the drive

  • "EndTeam" - The offensive team on the drive

Examples

Run this code
# NOT RUN {
# Parsed drive Summarize of final game in 2015 NFL Season
nfl2015.finalregseasongame.gameID <- "2016010310"
drive_summary(nfl2015.finalregseasongame.gameID) 
# }

Run the code above in your browser using DataLab