
The default handler for highlights within the shiny app
Source:R/playlist.R
ovva_highlight_handler.Rdovva_highlight_handler provides functions that create highlight playlists. Highlights are judged according to the weighting scheme defined by ovva_highlight_weighting.
Arguments
- clip_duration
numeric: the maximum highlight clip length in seconds
- weights
data.frame: a data.frame or tibble with columns
skill,evaluation_code, andhighlight_weighting. Any values provided here will override the corresponding defaultsYou can cook up your own version of this highlight handler function to suit your liking, and pass it as the
highlight_handlerparameter toovva_shiny.
Value
A tibble, with columns 'skill', 'specific', and 'fun'. Each row defines a playlist entry that corresponds to specific match conditions. This playlist entry is referred to by the name given in specific, and applies to the skill in column skill. The corresponding entry in fun should be a function that takes three arguments (x, the play-by-play data; team, the team names to look for, and player, the player names to look for) and returns the subset of rows of x that correspond to the playlist conditions.