do_scrape_shots_acb: ACB shooting data

View source: R/do_scrape_shots_acb.R

do_scrape_shots_acbR Documentation

ACB shooting data

Description

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.

Usage

do_scrape_shots_acb(data_days, verbose, user_agent_def, x_apikey)

Arguments

data_days

Data frame with the game codes of each day. It is obtained with do_scrape_days_acb.

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.

Value

A data frame with the shooting data.

Note

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.

Author(s)

Guillermo Vinue

See Also

do_scrape_days_acb

Examples

## 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)


BAwiR documentation built on Feb. 27, 2026, 5:07 p.m.