Skip to contents

Get NCAA Baseball Game Logs

Usage

ncaa_game_logs(player_id, year, type = "batting", span = "game", ...)

Arguments

player_id

A player's unique id. Can be found using the get_ncaa_baseball_roster function.

year

The year of interest.

type

The kind of statistics you want to return. Current options are 'batting', 'pitching', or 'fielding'.

span

The span of time; can either be 'game' for game logs in a season, or 'career' which returns seasonal stats for a player's career.

...

Additional arguments passed to an underlying function like httr.

Value

A data frame containing player and school information as well as game-by-game statistics. The exact stat columns vary by type (batting / pitching / fielding) and span (game / career); the table below shows the pitching (type = "pitching", span = "game") columns.

col_nametypesdescription
player_idnumericstats.ncaa.org player identifier.
player_namecharacterPlayer name.
DatecharacterGame date.
OpponentcharacterOpponent name.
ResultcharacterGame result (W/L and score).
AppnumericAppearances.
GnumericGames.
GSnumericGames started.
IPnumericInnings pitched.
CGnumericComplete games.
HnumericHits allowed.
RnumericRuns allowed.
ERnumericEarned runs allowed.
BBnumericWalks (bases on balls) allowed.
SOnumericStrikeouts.
SHOnumericShutouts.
BFnumericBatters faced.
P-OABnumericOpponent at-bats.
2B-AnumericDoubles allowed.
3B-AnumericTriples allowed.
BknumericBalks.
HR-AnumericHome runs allowed.
WPnumericWild pitches.
HBnumericHit batters.
IBBnumericIntentional walks allowed.
Inh RunnumericInherited runners.
Inh Run ScorenumericInherited runners who scored.
SHAnumericSacrifice hits allowed.
SFAnumericSacrifice flies allowed.
PitchesnumericPitch count.
GOnumericGround outs induced.
FOnumericFly outs induced.
WnumericWins.
LnumericLosses.
SVnumericSaves.
OrdAppearednumericOrder in which the pitcher appeared.
KLnumericStrikeouts looking (called third strike).
pickoffscharacterPickoffs.

Details

Live usage (reads stats.ncaa.org, which is behind Akamai bot protection and needs the optional chromote + Google Chrome browser fallback, so it is shown here rather than as a runnable example):

ncaa_game_logs(player_id = 2649785, year = 2023, type = "pitching", span = "game")
ncaa_game_logs(player_id = 2477974, year = 2023, type = "pitching", span = "career")
ncaa_game_logs(player_id = 2680961, year = 2023, type = "batting", span = "game")
ncaa_game_logs(player_id = 2486588, year = 2023, type = "batting", span = "career")