View source: R/do_scrape_shots_acb.R
| do_scrape_shots_acb | R Documentation |
Obtain the shooting data from the ACB website and creates a common R data structure. Each shot is described with its (x, y) coordinates and other additional information, such as the outcome of the shot (made or missed) or the player who took that shot.
do_scrape_shots_acb(data_days, verbose, user_agent_def, x_apikey)
data_days |
Data frame with the game codes of each day.
It is obtained with |
verbose |
Should R report information on progress? TRUE or FALSE. |
user_agent_def |
String with the user agent. |
x_apikey |
String with the X-APIKEY. |
A data frame with the shooting data.
The original codes of the playType column have the following meaning: 92: ft made; 93: 2pt made; 94: 3pt made; 96: ft missed. 97: 2pt missed; 98: 3pt missed; 100: dunk.
Guillermo Vinue
do_scrape_days_acb
## Not run:
data_days <- do_scrape_days_acb("2024", "analyst_name", TRUE, 2, 975)
data_shots <- do_scrape_shots_acb(data_days[1:2, ], TRUE, "user_agent_def", "x_apikey")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.