Skip to contents

(legacy) Scrape NCAA baseball Team Player Stats (Division I, II, and III)

Usage

ncaa_scrape(
  team_id,
  year = most_recent_ncaa_baseball_season(),
  type = "batting",
  ...
)

Arguments

team_id

The numerical ID that the NCAA website uses to identify a team

year

The season for which data should be returned, in the form of "YYYY". Years currently available: 2013-2017.

type

A string indicating whether to return "batting", "pitching", or "fielding" statistics

...

Additional arguments passed to an underlying function like httr.

Value

A data frame with the following variables. The exact stat columns vary by type (batting / pitching / fielding); the table below shows the batting (type = "batting") columns.

col_nametypesdescription
yearintegerSeason (4-digit year).
team_namecharacterTeam name.
team_idnumericTeam NCAA id.
conference_idintegerConference identifier.
conferencecharacterConference name.
divisionnumericNCAA division (1, 2, 3).
player_idintegerstats.ncaa.org player identifier.
player_urlcharacterFull stats.ncaa.org url for the player page.
player_namecharacterPlayer name.
YrcharacterAcademic class/year (Fr, So, Jr, Sr).
PoscharacterPrimary fielding position.
JerseycharacterJersey number (the site's "#" column).
GPnumericGames played.
GSnumericGames started.
BAnumericBatting average.
OBPctnumericOn-base percentage.
SlgPctnumericSlugging percentage.
RnumericRuns scored.
ABnumericAt-bats.
HnumericHits.
2BnumericDoubles.
3BnumericTriples.
TBnumericTotal bases.
HRnumericHome runs.
RBInumericRuns batted in.
BBnumericWalks (bases on balls).
HBPnumericHit by pitch.
SFnumericSacrifice flies.
SHnumericSacrifice hits (bunts).
KnumericStrikeouts.
DPnumericGrounded into double plays (site's "OPP DP").
CSnumericCaught stealing.
PickednumericTimes picked off.
SBnumericStolen bases.
RBI2outnumericRuns batted in with two outs.