Analysis of Basketball Data

Collection of tools to work with basketball data. Functions available are related to friendly web scraping and visualization. Data were obtained from <>, <> and <>, following the instructions of their respectives robots.txt files, when available. Tools for visualization 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 and maps of nationalities. Please see Vinue (2020) .


Package: BAwiR

Version: 1.2 [2019-02-17]

  • get_barplot_monthly_stats() and get_stats_seasons() allow now to represent multiple players at the same time.
  • get_four_factors_plot() allows now to represent multiple teams at the same time.
  • get_heatmap_bb() allows to represent different aspects of the game (offensive stats, defensive stats, etc) separately or all together.
  • get_pop_pyramid_acb() is now get_pop_pyramid().
  • Submitted to CRAN.

Version: 1.1.3 [2018-09-24]

  • In scraping_games_acb(), the seasons where there are no Plus/Minus have been updated. Thus, it is not needed to update the package every time there is a new ACB season.
  • Submitted to CRAN.

Version: 1.1.2 [2018-09-10]

  • An html vignette has been added.
  • In get_stats_seasons()$df_gg, the column Age indicates the age of player at February 1st of the season.
  • Submitted to CRAN.

Version: 1.1.1 [2018-07-10]

  • The scraping numbers for the playoff games for the ACB 2017-2018 season have been added to scraping_games_acb().
  • Submitted to CRAN.

Version: 1.1 [2018-05-09]

  • A minor typo has been corrected in scraping_rosters_acb() and scraping_rosters_euro() to check if the data frame is NULL before adding name columns.
  • In the same two functions, the colon notation in the initial loop has been replaced by seq_len to avoid the backwards sequence bug.
  • A minor typo has been corrected in do_four_factors_df() to identify the games that every team played.
  • get_pop_pyramid_acb() has been corrected to be in line with ggplot2 updates.
  • get_map_nats() is not interactive anymore in order to harmonize with all other functions. This feature is just in the web application.
  • These new functions have been added:
    • do_stats_teams() Total and average statistics for every team.
    • get_similar_teams() Similar teams to archetypoids.
    • get_stats_seasons() Season-by-season average players' stats.
    • get_table_results() Cross table of league results.
  • Submitted to CRAN.

Version: 1.0 [2018-01-25]

  • First package version.
  • Submitted to CRAN.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.