knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", message = FALSE )
An R package for reading Perana Sports VBStats volleyball scouting files as well as Perana Sports VideoTagger files.
See also datavolley, which provides similar functionality for reading DataVolley files into R. The conventions (data structures, variable naming, etc) used in the peranavolley package follow those of the datavolley package.
options(repos = c(openvolley = "https://openvolley.r-universe.dev", CRAN = "https://cloud.r-project.org")) install.packages("peranavolley") ## or ## install.packages("remotes") ## if needed remotes::install_github("openvolley/peranavolley")
Read one of the example data files bundled with the package:
library(peranavolley) x <- pv_read(pv_example_file()) summary(x)
Number of serves by team:
serve_idx <- which(plays(x)$skill == "Serve") table(plays(x)$team[serve_idx])
Attack kill rate by player, using dplyr
:
library(dplyr) plays(x) %>% dplyr::filter(skill == "Attack") %>% group_by(team, player_name, player_id) %>% dplyr::summarize(`N attacks` = n(), `Kill rate` = mean(evaluation == "Winning attack", na.rm = TRUE)) %>% ungroup %>% dplyr::arrange(desc(`Kill rate`)) %>% dplyr::select(-player_id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.