Learn R Programming

⚠️There's a newer version (1.4.4) of this package.Take me there.

BAwiR (version 1.4.3)

Analysis of Basketball Data

Description

Collection of tools to work with European basketball data. Functions available are related to friendly web scraping, data management and visualization. Data were obtained from , and , following the instructions of their respectives robots.txt files, when available. Box score data are available for the three leagues. Play-by-play and spatial shooting data are also available for the Spanish league. Methods for analysis include a population pyramid, 2D plots, circular plots of players' percentiles, plots of players' monthly/yearly stats, team heatmaps, team shooting plots, team four factors plots, cross-tables with the results of regular season games, maps of nationalities, combinations of lineups, possessions-related variables, timeouts, performance by periods, personal fouls, offensive rebounds and different types of shooting charts. Please see Vinue (2020) and Vinue (2024) .

Copy Link

Version

Install

install.packages('BAwiR')

Monthly Downloads

373

Version

1.4.3

License

GPL (>= 2)

Maintainer

Guillermo Vinue

Last Published

December 9th, 2025

Functions in BAwiR (1.4.3)

acb_vbc_cz_pbp_2223

ACB play-by-play data, 2022-2023, Valencia Basket-Casademont Zaragoza
do_best_zones

Best players by zone
capit_two_words

Capitalize two-word strings
do_OE

Offensive Efficiency (OE)
acb_players_2425

ACB players 2024-2025
do_filter_data

Filter shooting data
do_process_acb_pbp

Processing of the ACB website play-by-play data
do_offensive_fouls

Compute offensive fouls
do_possession

Compute when possessions start
do_stats

Accumulated or average statistics
do_rpackage_stats

R package downloads
do_scrape_days_acb

ACB day game codes
do_stats_per_period

Compute stats per period
do_four_factors_df

Four factors data frame
do_join_games_bio

Join games and players' info
do_prepare_data_gradient

Prepare the data for the gradient shooting plots
do_ft_fouls

Compute free throw fouls
do_prepare_data_or

Prepare data for the offensive rebounds computation
do_divide_court_zones

Zones of the basketball court
do_scrape_shots_acb

ACB shooting data
do_lineup

Compute ACB lineups
euroleague_games_1718

Euroleague games 2017-2018
do_possession_stats

Possessions-related statistics
do_map_nats

Data frame for the nationalities map
eurocup_players_1718

Eurocup players 2017-2018
get_bubble_plot

Basketball bubble plot
get_plot_monthly_stats

Monthly stats
euroleague_players_1718

Euroleague players 2017-2018
get_stats_seasons

Season-by-season stats
get_sticker

Player's sticker
get_pop_pyramid

Population pyramid
do_time_out_success

Check if timeouts resulted in scoring
do_time_out_success_altern

Alternative timeouts
do_reb_off_success

Check if scoring after offensive rebounds
do_volume_threes

Volume of three-point shots
do_scraping_rosters

Players profile data
eurocup_games_1718

Eurocup games 2017-2018
scraping_games_acb

ACB player game finder data
get_similar_teams

Similar teams to archetypoids
get_similar_players

Similar players to archetypoids
scraping_games_acb_old

Old ACB player game finder data
do_shots_stats

Shots statistics
get_donut_usage

Donut chart usage possessions
do_usage

Players' usage
do_scraping_games

Player game finder data
do_violin_box_plots

Plots of data distributions
do_viz_shots_gradient

Visualization of the shots statistics with advanced features
get_heatmap_bb

Basketball heatmap
do_viz_shots_scatter

Visualization of the shots statistics
get_donut_usage_action

Donut chart usage possessions action
do_prepare_data

Prepare ACB play-by-play data
get_map_nats

Nationalities map
join_players_bio_age_acb

Join ACB games and players' info
get_table_results

League cross table
get_roster_age_profile

Roster age profile
do_prepare_data_to

Prepare data for the timeouts computation
do_preproc_period

Data preprocessing for periods
do_stats_teams

Accumulated and average statistics for teams
scraping_rosters_acb

ACB players' profile
scraping_games_euro

Euroleague and Eurocup player game finder data
get_shooting_plot

Shooting plot
scraping_rosters_euro

Euroleague and Eurocup players' profile
do_sub_lineup

Compute ACB sub-lineups
join_players_bio_age_euro

Join Euroleague and Eurocup games and players' info
get_games_rosters

Get all games and rosters
get_four_factors_plot

Four factors plot
metrics_player_zone

ACB players 2024-2025
acb_players_1718

ACB players 2017-2018
do_clutch_time

Get games with clutch time
acb_age_profile_data_2526

ACB age profile, 2025-2026, Valencia Basket
acb_vbc_cz_sl_2223

ACB starting lineups, 2022-2023, Valencia Basket-Casademont Zaragoza
acb_games_1718

ACB games 2017-2018
acb_usage_act_data_2526

ACB usage action data, 2025-2026
acb_usage_data_2526

ACB usage data, 2025-2026
acb_games_2223_coach

ACB coaches in the 2022-2023 season.
acb_shields

Shields of the ACB teams
acb_sticker_data_2526

ACB sticker data, 2025-2026
do_add_adv_stats

Advanced statistics
acb_games_2223_info

ACB games 2022-2023, days and codes.
acb_shooting_data_2425

ACB shooting data, 2024-2025
do_EPS

Efficient Points Scored (EPS)