Learn R Programming

ncaavolleyballr

Inspired by the NCAA data extraction functions from the {baseballr} package, the goal of {ncaavolleyballr} is to extract women's and men's volleyball information from the NCAA website. The functions in this package can extract team records/schedules and player statistics for the 2020-2024 NCAA women's and men's divisions I, II, and III volleyball teams. Functions can aggregate statistics for teams, conferences, divisions, or custom groups of teams.

Installation

You can install the stable released version of flashr from CRAN with:

install.packages("ncaavolleyballr")

You can install developmental versions from GitHub with:

# install.packages("remotes")
remotes::install_github("JeffreyRStevens/ncaavolleyballr")

Usage

library(ncaavolleyballr)

A suite of functions can be used to extract season, match, and play-by-play data for teams and players. See the Getting Started vignette for a more thorough description of the functions.

Season data

The NCAA uses a unique team ID for each women's and men's volleyball team and season. So to access a team's season data, first you will need to get that ID with the find_team_id(). For instance, to find the ID for Penn State's 2024 season:

find_team_id("Penn St.", 2024)
#> [1] "585406"

With this team ID, you can now extract overall season performance data for the team's players with the player_season_stats().

find_team_id("Penn St.", 2024) |> 
  player_season_stats()
SeasonTeamConferenceNumberPlayerYrPosHtHometownHigh SchoolGPGSSKillsErrorsTotal AttacksHit PctAssistsAcesSErrDigsRetAttRErrBlock SolosBlock AssistsBErrPTSBHETrpl Dbl
2024-2025Penn St.Big Ten1Taylor TrammellSrMB6-2Lexington, KYHenry Clay3737130260484800.44231525144111247334.0NANA
2024-2025Penn St.Big Ten2Ava FaldutoFrL/DS5-7Elmhurst, ILIC Catholic Prep3731350070.00070394331054321NANANA39.0NANA
2024-2025Penn St.Big Ten3Gillian GrimesJrL/DS5-6Westchester, ILNazareth Academy37013540110.364163385552955129NANANA42.0NANA
2024-2025Penn St.Big Ten4Karis WillowSoOH6-4Arlington, OHLiberty Benton2022260.000NANANANA5NANANANA2.0NANA
2024-2025Penn St.Big Ten5Jordan HoppSrMB6-2Alliance, NEAlliance10019127310.161NANANA21NA218NA23.0NANA
2024-2025Penn St.Big Ten6Kate LallySoDS5-9State College, PAState College303000NANANANANANANANANANANANANA
2024-2025Penn St.Big Ten8Camryn HannahSrOH6-2Lansing, ILMarist37413348017910520.2864286711312999313532.5NANA
2024-2025Penn St.Big Ten9Jess MruzikSrOH6-1Livonia, MIFarmington Hills Mercy373713056517814970.2595132553136933517515639.51NA
2024-2025Penn St.Big Ten10Anjelina StarckSrOH6-2Colorado Springs, CORampart2924922415940.096197114629318NA6NA34.0NANA
2024-2025Penn St.Big Ten11Jocelyn NathanSoL/DS5-6Wilmington, DEWilmington Friends School221059000NA10776914610NANANA7.0NANA
2024-2025Penn St.Big Ten14Caroline JureviciusFrRS6-2Cleveland, OHNotre Dame-Cathedral Latin36311232481055800.2476NA454NANA3782290.0NANA
2024-2025Penn St.Big Ten19Alexa MarkleyJrOH6-2Peachtree City, GAMcIntosh11221238610.246NANA174119128.5NANA
2024-2025Penn St.Big Ten21Izzy StarckFrS6-1Viera, FLViera3737135112372800.26814831943342511985181.03NA
2024-2025Penn St.Big Ten23Catherine BurkeSoMB6-3Glenview, ILLoyola Academy4040040.000NANA1NANANANA2NA1.0NANA
2024-2025Penn St.Big Ten24Quinn MengerSrDS5-9Powhatan, VASt. Catherine's School3711220020.00017282738NANANANANA28.0NANA
2024-2025Penn St.Big Ten44Maggie MendelsonJrMB6-5North Ogden, UTFremont3736127242695680.3051541546251181287328.0NANA
2024-2025Penn St.Big TenNATEAM---NANANANANANANANANANANANANANA11NANANANANANA
2024-2025Penn St.Big TenNATotals---NANANANA135197264846730.28318412033241994242014062545302509.5437
2024-2025Penn St.Big TenNAOpponent Totals---NANANANA135153571045930.18014581402811716285320352449681951.5537

Match data

The NCAA also uses a unique contest ID for each women's and men's volleyball match. The easiest way to get that ID is with find_team_contest(), which returns the contest ID for all matches in a particular season (using the Team ID provided by find_team_id()). For instance, to find the contest ID for 2024 National Championship match between Louisville and Penn State:

find_team_id("Penn St.", 2024) |> 
  find_team_contests() |> 
  tail()
dateteamopponentresultattendancecontest
12/06/2024Penn St.Delaware St.W 3-025166080734
12/07/2024Penn St.North CarolinaW 3-124706080733
12/13/2024Penn St.MarquetteW 3-129146081048
12/15/2024Penn St.CreightonW 3-235586081042
12/19/2024Penn St.NebraskaW 3-2217266080708
12/22/2024Penn St.LouisvilleW 3-1218606080706

From that, we can see that the contest ID is 6080706. If we pass this contest ID to the player_match_stats() function, we'll get a list with two data frames (one for each team in the contest) that contain player statistics for the match. If we want to get just the Penn State player data, we can set team = "Penn St.".

player_match_stats(contest = "6080706", team = "Penn St.")
SeasonDateTeamConferenceOpponent TeamOpponent ConferenceLocationNumberPlayerPSKillsErrorsTotalAttacksHitPctAssistsAcesSErrDigsRetAttRErrBlockSolosBlockAssistsBErrPTSBHE
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome2Ava FaldutoL/DS40000.000221142400002.00
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome3Gillian GrimesL/DS40000.000713162310001.00
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome8Camryn HannahOH4199420.23801439211021.50
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome14Caroline JureviciusOH4104260.23100030002011.00
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome44Maggie MendelsonMB461140.3571001001509.50
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome24Quinn MengerDS40000.0000014000000.00
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome9Jess MruzikOH4296730.3151111422114233.01
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome11Jocelyn NathanL/DS40000.000310101000001.00
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome21Izzy StarckS4027-0.286551313000101.50
2024-20252024-12-22Penn St.Big TenLouisvilleACCHome1Taylor TrammellMB481150.4670000000309.50
2024-20252024-12-22Penn St.Big TenLouisvilleACCHomeNATEAM00000.0000000000000.00
2024-20252024-12-22Penn St.Big TenLouisvilleACCHomeNAPenn St.472231770.2776971378884316290.01

Play-by-play data

Play-by-play data are also available with match_pbp(). This returns a data frame with all events and players.

match_pbp(contest = "6080706") |> 
  head(10)
setaway_teamhome_teamscoreteameventplayerdescription
1LouisvillePenn St.0-0LouisvilleServePayton PetersenPayton Petersen serves
1LouisvillePenn St.0-0Penn St.ReceptionJocelyn NathanReception by Jocelyn Nathan
1LouisvillePenn St.0-0Penn St.SetIzzy StarckSet by Izzy Starck
1LouisvillePenn St.0-0Penn St.AttackTaylor TrammellAttack by Taylor Trammell
1LouisvillePenn St.0-1Penn St.First ball killTaylor TrammellFirst ball kill by Taylor Trammell
1LouisvillePenn St.0-1Penn St.ServeGillian GrimesGillian Grimes serves
1LouisvillePenn St.0-1LouisvilleReceptionPayton PetersenReception by Payton Petersen
1LouisvillePenn St.0-1LouisvilleSetElle GlockSet by Elle Glock
1LouisvillePenn St.0-1LouisvilleAttackCara CresseAttack by Cara Cresse
1LouisvillePenn St.1-1LouisvilleFirst ball killCara CresseFirst ball kill by Cara Cresse

Other functionality

By default, these functions return information on women's teams, but they can be set to return men's information by setting sport = "MVB". You can also aggregate data across conferences, divisions, or custom groups with conference_stats(), division_stats(), and group_stats().

Citation

To cite {ncaavolleyballr}, use:

Stevens JR (2025). Extract Data from NCAA Women’s and Men’s Volleyball Website. R package version 0.4.3, https://github.com/JeffreyRStevens/ncaavolleyballr.

Acknowledgments

Many thanks to Bill Petti for making the code for NCAA stats extraction freely available in the {baseballr} package. And thank you to Tyler Widdison for inspiring me to extract the play-by-play data (check out his {ncaavolleyballR} package for some similar functionality). Code from {baseballr} and {rvest} (both licensed under an MIT license) have been incorporated and modified in this package.

The volleyball background in the logo was designed by Freepik.

Copy Link

Version

Install

install.packages('ncaavolleyballr')

Monthly Downloads

242

Version

0.4.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Jeffrey R. Stevens

Last Published

July 22nd, 2025

Functions in ncaavolleyballr (0.4.3)

most_recent_season

Assigns most recent season
player_season_stats

Extract player statistics from a particular team and season
group_stats

Aggregate player statistics and play-by-play information
fix_teams

Fix teams that change their names
html_table_raw

Creates table of raw HTML
request_live_url

Submit URL request via live browser
ncaavolleyballr-package

ncaavolleyballr: Extract Data from NCAA Women's and Men's Volleyball Website
team_match_stats

Extract team summary statistics for all matches in a particular season
find_team_contests

Extract date, opponent, and contest ID for team and season
team_season_info

Extract arena, coach, record, and schedule information for a particular team and season
find_team_id

Find team ID for season
save_df

Save data frames
request_url

Submit URL request, check, and return response
ncaa_teams

NCAA Team Names
ncaa_sports

NCAA Sports and Sport Codes
team_season_stats

Extract teams statistics for season statistics from 2020-2024
mvb_teams

NCAA Men's Volleyball Teams 2020-2024
ncaa_conferences

NCAA Conference Names
wvb_teams

NCAA Women's Volleyball Teams 2020-2024
player_match_stats

Extract player statistics for a particular match
check_sport

Checks if sport is valid
conference_stats

Aggregate player statistics for a NCAA conference and seasons
division_stats

Aggregate player statistics for a NCAA division and seasons
match_pbp

Extract play-by-play information for a particular match
find_team_name

Match pattern to find team names
check_contest

Checks if contest ID is valid
check_year

Checks if year is valid
check_team_name

Checks if team name is valid
check_match

Checks if value is matched in vector
check_team_id

Checks if team ID is valid
check_logical

Checks if a logical input is valid
get_teams

Extract data frame of team names, IDs, conference, division, and season
check_confdiv

Checks if division or conference is valid
get_team_info

Gets year, team, and conference from team ID