get_team_schedule: Team Schedule Scrape

get_team_scheduleR Documentation

Team Schedule Scrape

Description

This function returns a data frame of the schedule for the specified team. This will include game ids used for play-by-play scraping if the game has ended, along with the team scores and attendance.

Usage

get_team_schedule(
  team.id = NA,
  season = NA,
  team.name = NA,
  use_file = F,
  save_file = F,
  base_path = NA,
  overwrite = F
)

Arguments

team.id

The unique id given to each college/team for each season. This can be found in the url of the team page.

season

Season following format yyy1-y2, ex "2018=19"

team.name

Alternative to using the id, you can get a team from data(teamids) with a season and team name specification. This inputs a team name, to be used along with season. This needs the school name not the complete team name, so "Duke" not "Duke Blue Devils".

Value

data frame with each row representing an individual game

  • Date - Game date

  • Home - Home team

  • Home_Score - If the game is finished, the final score for the home team

  • Away - Away team

  • Away_Score - If the game is finished, the final score for the away team

  • Game_ID - If the game is finished and has play-by-play data available, the game ID used to scrape game data

  • isNeutral - A logical variable that is true when the game was played at a designated neutral destination

  • Detail - Additional detail such as if the game went into OT and # of OTs

Examples

get_team_schedule(team.id = 450680)
get_team_schedule(season = "2018-19", team.name = "Penn")

jflancer/bigballR documentation built on March 1, 2025, 3:57 a.m.