do_prepare_data_to {BAwiR} | R Documentation |
Prepare data for the timeouts computation
Description
The computation of the successful timeouts requires a specific data preparation. This function does this data processing.
Usage
do_prepare_data_to(data, rm_overtime, data_ginfo, data_gcoach)
Arguments
data |
Source play-by-play data from a given game. |
rm_overtime |
Logical. Decide to remove overtimes or not. |
data_ginfo |
Games' basic information. |
data_gcoach |
Coach of each team in each day. |
Value
Data frame. Each row represents the action happened in the game. The team column refers in this case both to the team to which the player belongs and the coach of that team. In addition, a points column is added to transform the action that finished in scoring into numbers .
Note
1. Actions are given in Spanish. A bilingual basketball vocabulary (Spanish/English) is provided in https://www.uv.es/vivigui/docs/basketball_dictionary.xlsx.
2. The game_code column allows us to detect the source website, for example, https://jv.acb.com/es/103389/jugadas.
Author(s)
Guillermo Vinue
See Also
Examples
df0 <- acb_vbc_cz_pbp_2223
df1 <- do_prepare_data_to(df0, TRUE, acb_games_2223_info, acb_games_2223_coach)
#df1