bbr: basketball-reference data in R

Travis-CI Build Status Coverage Status CRAN_Status_Badge Licence Last-changedate

The bbr package is designed to quickly fetch tidy data from www.basketball-reference.com. This package is actively under development and the interface will change as new features are added.

Installation

devtools::install_github("mbjoseph/bbr")

Example usage

The get_season function retrieves season summary data for one season.

library(bbr)

ninetyone <- get_season(1991)
str(ninetyone)

The get_players function gets player data for individuals by last initial.

a_data <- get_players("A")
str(a_data)

The get_player_data function returns data for each season that a player played. As an argument, this function takes a slug for the player you're interested in. This can be found using the get_players() function, and is part of the URL to the data of a player, e.g., if the URL is https://www.basketball-reference.com/players/a/abdelal01.html then the slug is abdelal01.

abdelnaby_d <- get_player_data('abdelal01')
str(abdelnaby_d)


mbjoseph/bbr documentation built on May 22, 2019, 12:20 p.m.