cfb_game_info: Get results information from games

Description Usage Arguments Value Source Examples

View source: R/cfb_game_info.R

Description

Get results information from games

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cfb_game_info(
  year,
  week = NULL,
  season_type = "regular",
  team = NULL,
  home_team = NULL,
  away_team = NULL,
  conference = NULL,
  game_id = NULL,
  quarter_scores = FALSE
)

Arguments

year

(Integer required): Year, 4 digit format(YYYY)

week

(Integer optional): Week - values from 1-15, 1-14 for seasons pre-playoff (i.e. 2013 or earlier)

season_type

(String default regular): Select Season Type: regular, postseason, or both

team

(String optional): D-I Team

home_team

(String optional): Home D-I Team

away_team

(String optional): Away D-I Team

conference

(String optional): Conference abbreviation - Select a valid FBS conference
Conference abbreviations P5: ACC, B12, B1G, SEC, PAC
Conference abbreviations G5 and FBS Independents: CUSA, MAC, MWC, Ind, SBC, AAC

game_id

(Integer optional): Game ID filter for querying a single game

quarter_scores

(Logical default FALSE): This is a parameter to return the list columns that give the score at each quarter: home_line_scores and away_line scores.
I have defaulted the parameter to false so that you will not have to go to the trouble of dropping it.

Value

A data frame with 22 variables:

game_id

integer.

season

integer.

week

integer.

season_type

character.

start_date

character.

start_time_tbd

logical.

neutral_site

logical.

conference_game

logical.

attendance

integer.

venue_id

integer.

venue

character.

home_id

integer.

home_team

character.

home_conference

character.

home_points

integer.

home_post_win_prob

character.

away_id

integer.

away_team

character.

away_conference

character.

away_points

integer.

away_post_win_prob

character.

excitement_index

character.

Source

https://api.collegefootballdata.com/games

Examples

1
2
3
4
5
6
cfb_game_info(2018, week = 1)

cfb_game_info(2018, week = 7, conference = 'Ind')

#7 OTs LSU @ TAMU
cfb_game_info(2018, week = 13, team = "Texas A&M", quarter_scores=TRUE)

meysubb/cfbscrapR documentation built on Dec. 15, 2020, 11:26 p.m.