do_filter_data: Filter shooting data

View source: R/do_filter_data.R

do_filter_dataR Documentation

Filter shooting data

Description

Filter the shooting data with the team or player of interest, and also by periods, minutes and game place. If neither team nor player is given, the data from the whole league is used.

Usage

do_filter_data(data_shots_zones, season_str, team, period, minute_vect, place, player)

Arguments

data_shots_zones

Shooting data with the court zones.

season_str

String with the season.

team

String with the team's full name. Nothing to filter if "".

period

Number with the periods (1, 2, 3 and 4 for the common four quarters, 5 for the first overtime and 6 for the second overtime). Nothing to filter if "".

minute_vect

Vector with the minutes to filter by. Nothing to filter if "".

place

String. If "Home" or "Casa", the local games are filtered. Nothing to filter if "".

player

String with the player's name. Nothing to filter if "".

Value

A data frame with the filters applied.

Author(s)

Guillermo Vinue

See Also

do_divide_court_zones

Examples

## Not run: 
df0 <- do_divide_court_zones(acb_shooting_data_2425)

# Data for the whole league:
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "")

# Data for a team:
df1 <- do_filter_data(df0, "2024-2025", "UCAM Murcia", "", "", "", "")

# Data for a player:
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "D. Ennis")

# Other filters:
# By minutes:
df1 <- do_filter_data(df0, "2024-2025", "", "", c(8,10), "", "D. Ennis")

## End(Not run)


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