season_play_by_play: Parsed Descriptive Play-by-Play Function for a Full Season

Description Usage Arguments Details Value Examples

View source: R/PlayByPlayBoxScore.R

Description

This function outputs all plays of an entire season in one dataframe. It calls the game_play_by_play function and applies it over every game in the season by extracting each game ID and url in the specified season. WARNING: This function is deprecated and will be removed from the package after the 2018-19 season.

Usage

1

Arguments

Season

(numeric) A 4-digit year corresponding to an NFL season of interest

Details

This function calls the extracting_gameids, proper_jsonurl_formatting, and game_play_by_play to aggregate all the plays from a given season. This dataframe is prime for use with the dplyr and plyr packages.

Value

A dataframe contains all the play-by-play information for a single season. This includes all the 99 variables collected in our game_play_by_play function (see documentation for game_play_by_play for details) and a column for the Season.

Examples

1
2
3
4
5
# Play-by-play data from all games in 2010
pbp.data.2010 <- season_play_by_play(2010)

# Looking at all Pittsburgh Steelers offensive plays 
subset(pbp.data.2010, posteam = "PIT")

maksimhorowitz/nflscrapR documentation built on April 3, 2020, 7:40 p.m.