Package 'volleyreport'

Title: Reports from Volleyball Match Files
Description: Functions for generating reports from volleyball match files.
Authors: Adrien Ickowicz [aut, cre], Ben Raymond [aut], Tyler Widdison [aut], Francesco Oleni [ctb], Willem de Wit [ctb], Marco Chiapello [ctb], Felipe Aparecido Lima [ctb], Mark Lebedew [ctb], openvolley.org [org]
Maintainer: Adrien Ickowicz <[email protected]>
License: MIT + file LICENSE
Version: 0.7.21
Built: 2024-10-15 22:26:44 UTC
Source: https://github.com/openvolley/volleyreport

Help Index


volleyreport

Description

Reporting of volleyball statistics

Author(s)

Maintainer: Adrien Ickowicz [email protected]

Authors:

  • Ben Raymond

  • Tyler Widdison

Other contributors:

  • Francesco Oleni [contributor]

  • Willem de Wit [contributor]

  • Marco Chiapello [contributor]

  • Felipe Aparecido Lima [contributor]

  • Mark Lebedew [contributor]

  • openvolley.org [originator]

See Also

Useful links:


Generate attack table

Description

Generate attack table

Usage

vr_attack(x, team, by = "player", file_type = "indoor", style = "default")

Arguments

x

datavolleyplays: the plays component of an object as returned by datavolley::dv_read

team

string: team name

by

string: "player" or "set"

file_type

string: "indoor", "perana_indoor", "beach", "perana_beach"

style

string: see vr_match_summary()


Generate block table

Description

Generate block table

Usage

vr_block(x, team, by = "player", style = "default")

Arguments

x

datavolleyplays: the plays component of an object as returned by datavolley::dv_read

team

string: team name

by

string: "player" or "set"

style

string: see vr_match_summary()


Court plots

Description

Court plots

Usage

vr_court_plots(x, ...)

Arguments

x

datavolley or string: as returned by datavolley::dv_read, or the path to such a file

...

: passed to downstream functions

Value

A ggplot object

Examples

## Not run: 
  vr_court_plots(dv_example_file())

## End(Not run)

Generate single-page match summary report

Description

Generate single-page match summary report

Usage

vr_match_summary(
  x,
  outfile,
  refx,
  vote = TRUE,
  format = "html",
  icon = NULL,
  css = vr_css(),
  remove_nonplaying = TRUE,
  style = "default",
  update_meta = FALSE,
  home_players = TRUE,
  visiting_players = TRUE,
  base_font_size = 11,
  court_plots_function = "vr_court_plots",
  court_plots_args = list(),
  plot_icons,
  skill_evaluation_decode = "guess",
  single_page_tries = 1L,
  shiny_progress = FALSE,
  chrome_print_extra_args = NULL,
  ...
)

vr_css()

Arguments

x

datavolley or string: as returned by datavolley::dv_read, or the path to such a file

outfile

string: path to file to produce (if not specified, will create a file in the temporary directory)

refx

data.frame: some choices of style require a reference data set to calculate e.g. expected SO. This should be from comparison matches (e.g. all matches from the same league), and should be a data.frame of the plays components from those matches. If missing, expected SO and BP will be replaced by reception and serve efficiency

vote

logical: include vote report component? If not explicitly specified, vote might be set to FALSE depending on style

format

string: "pdf" (using latex-based PDF), "paged_pdf" (using pagedown-based PDF), "png", "paged_png", or "html"

icon

string: (optional) filename of icon image to use

css

list: css specifications for some elements, giving (currently fairly limited) control over appearance. See the output of vr_css for an example. Note that some styling does not seem to be applied when exporting to PDF

remove_nonplaying

logical: if TRUE, remove players from the team summaries that did not take to the court

style

string: can be

  • "default" - the standard FIVB match report

  • "ov1" - modified version of "default" with score evolution plot, different breakdown by rotation, and other changes

update_meta

logical: should we update the match metadata before generating the report? Updating the match metadata will recalculate details such as set scores, player starting positions and substitution summaries, and set durations from the scouted play-by-play data

home_players

logical: include a table with individual player statistics for the home team?

visiting_players

logical: include a table with individual player statistics for the visiting team?

base_font_size

numeric: the base font size (the font sizes in different parts of the report are scaled relative to this)

court_plots_function

string or function: a function, or name of a function, that takes a datavolley object and produces a plot object. Supply your own function here to override the court plots that are included in the report for some values of style

court_plots_args

list: named list of arguments to pass to the court plot function

plot_icons

logical or data.frame: some values of style will include plots of various kinds in the report. Currently plot_icons defaults to TRUE for style = "ov1" on a beach match, otherwise FALSE (plot icons generally tend to be visually distracting with indoor, particularly the error icons). Set plot_icons to FALSE for no icons, TRUE to use the icons specified by vr_plot_icons(), or a data.frame as returned by vr_plot_icons() to control the icons that will be used. Note that only (free) fontawesome icons are supported

skill_evaluation_decode

: as for datavolley::dv_read()

single_page_tries

integer: experimental! Ideally we want a single-page report, but until the report is rendered to PDF we don't know for sure whether it will fit on one page. If single_page_tries is greater than 1, we will try re-rendering the report (trying up to this many times). If it does not fit on a single page, the base_font_size will be progressively reduced on each try. Note that this only applies to format "paged_pdf"

shiny_progress

logical: if TRUE, the report generation process will issue shiny::setProgress() calls. The call to vr_match_summary should therefore be wrapped in a shiny::withProgress() scope

chrome_print_extra_args

character: additional parameters to pass as extra_args to pagedown::chrome_print() (only relevant if using a "paged_*" format)

...

: additional parameters passed to the rmarkdown template

Value

The path to the report file

Examples

## Not run: 
  f <- vr_match_summary(dv_example_file(), format = "paged_pdf")
  if (interactive()) browseURL(f)

## End(Not run)

Score evolution plot

Description

Score evolution plot

Usage

vr_plot_icons()

vr_score_evplot(
  x,
  with_summary = FALSE,
  use_icons = FALSE,
  icons,
  home_colour = "darkblue",
  visiting_colour = "darkred",
  low_colour = "#800000",
  mid_colour = "#202020",
  high_colour = "#008000",
  font_size = 12
)

Arguments

x

datavolley or string: as returned by datavolley::dv_read, or the path to such a file

with_summary

logical: if TRUE, show team summary statistics. For beach, this is by end; for indoor summaries will be by set

use_icons

logical: add icons for ace/error/block kill?. Note that timeout icons are always added

icons

data.frame: a data.frame as returned by vr_plot_icons(). Note that only (free) fontawesome icons are supported

home_colour

string: colour for home team

visiting_colour

string: colour for visiting team

low_colour, mid_colour, high_colour

string: colours for low, mid, and high performance (used for with_summary only)

font_size

scalar: font size

Value

A ggplot object


Generate points table

Description

Generate points table

Usage

vr_points(x, team, by = "player", vote = FALSE, style = "default")

Arguments

x

datavolleyplays: the plays component of an object as returned by datavolley::dv_read

team

string: team name

by

string: "player" or "set"

vote

logical: if TRUE, include vote detail

style

string: see vr_match_summary()


Generate reception table

Description

Generate reception table

Usage

vr_reception(
  x,
  team,
  by = "player",
  refx,
  style = "default",
  file_type = "indoor"
)

Arguments

x

datavolleyplays: the plays component of an object as returned by datavolley::dv_read

team

string: team name

by

string: "player" or "set"

refx

data.frame: see vr_match_summary()

style

string: see vr_match_summary()

file_type

string: "indoor", "perana_indoor", "beach", "perana_beach"


Generate serve table

Description

Generate serve table

Usage

vr_serve(x, team, by = "player", refx, style = "default")

Arguments

x

datavolleyplays: the plays component of an object as returned by datavolley::dv_read

team

string: team name

by

string: "player" or "set"

refx

data.frame: see vr_match_summary()

style

string: see vr_match_summary()


Calculate vote

Description

Calculate vote

Usage

vr_vote(x, team)

Arguments

x

datavolleyplays: the plays component of an object as returned by datavolley::dv_read

team

string: team name