Learn R Programming

nflscrapR (version 1.4.0)

player_game: Detailed Boxscore for Single NFL Game

Description

This function is used to neatly read all of a players measurable statistics from a given game. Each player's statistics can be viewed on one line.

Usage

player_game(GameID)

Arguments

GameID

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

Value

This function outputs a single 55 column dataframe containing all rushing, passing, receiving, kick return, punt return, kicking, fumble, and defensive statistics for each player in a single game. Each player is assigned one line associated wih their statisitcs.

Details

This dataframe includes 55 variables including identifiers such as:

  • "Year", "gameID", "date", "Team", "playerID", "name"

Statistics are included for passing, rushing, receiving, kick return, punt return, kicking, defensive, and fumbles. The outputted columns are as follows:

  • "pass.att" - Number of pass attempts

  • "pass.comp" - Number of completed passes

  • "passyds" - Number of pass yards

  • pass.tds" - Number of passing touchdowns

  • "pass.ints" - Number of pass interceptions

  • "pass.twopta" - Number of passing two point conversions attempted

  • "pass.twoptm" - Number of passing two point conversions converted

  • "rush.att" - Number of rush attempts

  • "rushyds" - Number of rushing Yards

  • "rushtds" - Number of rushing touchdowns

  • "rushlng" - Most yards gained on a rush attempt

  • "rushlngtd" - Yards gained on longest touchdown run

  • "rush.twopta" - Number of rushing two point conversions attempted

  • "rush.twoptm" - Number of rushing two point conversions converted

  • "recept" - Number of receptions

  • "recyds" - Number of receiving yards

  • "rec.tds" - Number of receiving touchdowns

  • "reclng" - Longest reception

  • "reclngtd" - Longest receiving touchdown

  • "rec.twopta" - Number of targets on a two point conversion attempt

  • "rec.twoptm" - Number of receptions that resulted in a two point conversion success

  • "kick.rets" - Number of kickoff returns

  • "kickret.avg" - Average number of yards gained on kickoff returns

  • "kickret.tds" - Number of kickoff return touchdown

  • "kick.ret.lng" - Yards gained on longest kickoff return

  • "kickret.lngtd" - Yards gained on longest kickoff return that resulted in a touchdown

  • "punt.rets" - Number of punt returns

  • "puntret.avg" - Average number of yards gained on punt returns

  • "puntret.tds" - Number of punt return touchdowns

  • "puntret.lng" - Yards gained on longest punt return

  • "puntret.lngtd" - Yards gained on longest punt return that resulted in a touchdown

  • "fgm" - Number of field goals made

  • "fga" - Number of field goals attempted

  • "fgyds" - Yard length of longest made field

  • "totpts.fg" - Point value of all made field goals

  • "xpmade" - Number of extra points made

  • "xpmissed" - Number of extra points missed

  • "xpa" - Number of attempted extra points

  • "xpb" - Number of extra points blocked

  • "xppts.tot" - Point value of all made extra points

  • "tackles" - Number of tackles recorded

  • "asst.tackles" - Number of assisted tackles

  • "sacks" - Number of sacks

  • "defints" - Number of defensive interceptions

  • "forced.fumbs" - Number of forced fumbles

  • "totalfumbs" - Total fumbles associated with a player

  • "recfumbs" - Number of recovered fumble

  • "totalrecfumbs" - Number of recovered fumble

  • "fumbyds" - Number of yards recorded on fumble returns

  • "fumbslost" - Number of fumbles lost

Examples

Run this code
# NOT RUN {
# GameID for a random game
nfl.data.gameID <- "2013090800"
PlayerGameData <- player_game(nfl.data.gameID)
head(PlayerGameData)
# }

Run the code above in your browser using DataLab