knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-"
)

eurolig

lifecycle

The eurolig package provides a set of tools to obtain and analyze basketball generated data from the Euroleague.

Overview

Installation

# install.packages("devtools")
devtools::install_github("solmos/eurolig")

Example

Let's say we want to analyze play-by-play data from the Championship game of the 2017-2018 season between Real Madrid and Fenerbache Dogus Istanbul. We can obtain the data by entering the game code and the season to the function extractPbp(). The game code for the game can be found in the game's URL.

library(eurolig)
pbp <- extractPbp(game_code = 260, season = 2017)
pbp

From these data we can extract information about the assists in that game from, say, Real Madrid (MAD):

assists <- getAssists(pbp, team = "MAD")
assists

Shot location data can also be retrieved and visualized:

shots <- extractShots(260, 2017)
plotShotchart(shots)


solmos/euroleaguer documentation built on Jan. 30, 2022, 3:16 p.m.