Package 'euroleaguer'

Title: 'Euroleague' and 'Eurocup' basketball API
Description: Unofficial API wrapper for 'Euroleague' and 'Eurocup' basketball API (<https://www.euroleaguebasketball.net/en/euroleague/>), it allows to retrieve real-time and historical standard and advanced statistics about competitions, teams, players and games.
Authors: Flavio Leccese [aut, cre]
Maintainer: Flavio Leccese <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2024-11-23 05:04:16 UTC
Source: https://github.com/flavioleccese92/euroleaguer

Help Index


Get competition ahead-behind standings

Description

Get competition ahead-behind standings

Usage

getCompetitionAheadBehind(season_code, round)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

round

One or more round codes as obtained from getCompetitionRounds().

Value

Returns a summary tibble of ahead-behind for chosen competition and round

Reference webpage: Ahead-behind standings

Examples

## Not run: 

getCompetitionAheadBehind(season_code = c("E2023", "E2022"), round = 1)


## End(Not run)

Get competition calendar standings

Description

Get competition calendar standings

Usage

getCompetitionCalendar(season_code, round)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

round

One or more round codes as obtained from getCompetitionRounds().

Value

Returns a summary tibble of calendar standings for chosen competitions and rounds

Reference webpage: Calendar standings

Examples

if(interactive()) {

getCompetitionCalendar(season_code = c("E2023", "E2022"), round = 1)

}

Competition metadata

Description

[Experimental]

Retrieve values of arguments for specific data collection functions across all package.

Usage

getCompetitionHistory(competition_code)

getCompetitionRounds(season_code)

getCompetitionPhases(season_code)

getCompetitionTeams(season_code)

getCompetitionGames(season_code, round, phase_type = "All")

Arguments

competition_code

One or more competition codes.
Admitted values are E for Euroleague and U for Eurocup.

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

round

One or more round codes as obtained from getCompetitionRounds().

phase_type

One or more phase type codes as obtained from getCompetitionPhases().
Admitted values are RS for regular season, PO for playoffs and FF for final four. Default is All for all.

Value

For each function, returns a tibble with information about history, rounds, phases, teams or games of chosen season and competition code.

Examples

## Not run: 

getCompetitionHistory(competition_code = c("E", "U")) |> head(5)

getCompetitionRounds(season_code = c("E2023", "E2022")) |> head(5)

getCompetitionPhases(season_code = c("E2023", "U2023")) |> head(5)

getCompetitionTeams(season_code = c("E2023", "U2023")) |> head(5)

getCompetitionGames(season_code = "E2023", round = 1:5) |> head(5)


## End(Not run)

Get competition margins standings

Description

Get competition margins standings

Usage

getCompetitionMargins(season_code, round)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

round

One or more round codes as obtained from getCompetitionRounds().

Value

Returns a summary tibble of standing margins for chosen competition and round

Reference webpage: Margins standings

Examples

## Not run: 

getCompetitionMargins(season_code = c("E2023", "E2022"), round = 1)


## End(Not run)

Get competition traditional standings

Description

Get competition traditional standings

Usage

getCompetitionStandings(season_code, round)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

round

One or more round codes as obtained from getCompetitionRounds().

Value

Returns a summary tibble of standings for chosen competitions and rounds

Reference webpage: Traditional standings

Examples

## Not run: 

getCompetitionStandings(season_code = c("E2023", "E2022"), round = 1)


## End(Not run)

Get competition streaks standings

Description

Get competition streaks standings

Usage

getCompetitionStreaks(season_code, round)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

round

One or more round codes as obtained from getCompetitionRounds().

Value

Returns a summary tibble of streaks for chosen competitions and rounds

Reference webpage: Streaks standings

Examples

## Not run: 

getCompetitionStreaks(season_code = c("E2023", "E2022"), round = 1)


## End(Not run)

Get game box-score

Description

[Experimental]

Usage

getGameBoxScore(season_code, game_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

game_code

One or more game codes as obtained from getCompetitionGames().

Value

Returns a list of elements for the chosen games and seasons

  • Team. Name of the teams

  • Coach. Name of the coaches

  • EndOfQuarter. Team accumulated points by quarter

  • ByQuarter. Team points for each quarter

  • PlayerStats. Statistics for each player in the game

  • TeamStats. Aggregated statistics for each team in the game

Glossary of columns:

Column name Column extended name
GP Game player
GS Game started
MIN Minutes played
PTS Points scored
2PM Two-pointers made
2PA Two-pointers attempted
2P% Two-point %
3PM Three-pointers made
3PA Three-pointers attempted
3P% Three-point %
FTM Free throws made
FTA Free throws attempted
FT% Free-throw %
OREB Offensive rebounds
DREB Defensive rebounds
TREB Total rebounds
AST Assists
STL Steals
TO Turnovers
BLK Blocks
BLKA Blocks against
FC Personal fouls committed
FD Personal fouls drawn
PIR Performance Index Rating

Reference webpage: BoxScore

Examples

## Not run: 

getGameBoxScore(season_code = c("E2023", "U2023"), game_code = 1)


## End(Not run)

Get game evolution

Description

[Experimental]

Usage

getGameEvolution(season_code, game_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

game_code

One or more game codes as obtained from getCompetitionGames().

Value

Returns a list of two elements for the chosen games and seasons

  • EvolutionSummary. Overall information about minimum and maximum difference of scores between teams

  • Evolution. Minute by minute points of each team

Reference webpage: GraphicStats

Examples

## Not run: 

getGameEvolution(season_code = c("E2023", "U2023"), game_code = 1)


## End(Not run)

Game metadata

Description

[Experimental]

Retrieve contextual information about games. Outputs may be required as arguments of other ⁠getGame*⁠ functions

Usage

getGameHeader(season_code, game_code)

getGamePlayers(season_code, game_code, team_code)

getGameRound(season_code, game_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

game_code

One or more game codes as obtained from getCompetitionGames().

team_code

One or more team codes as obtained from getCompetitionTeams().
Examples are ASV, MAD, ...

Value

For each function, returns a tibble with information about header, player or round of chosen season and game code.

Examples

## Not run: 

getGameHeader(season_code = c("E2023", "U2023"), game_code = 1)

getGamePlayers(season_code = c("E2023", "U2023"), team_code = "ASV", game_code = 1)

getGameRound(season_code = c("E2023", "U2023"), game_code = 1)


## End(Not run)

Get game play-by-play

Description

[Experimental]

Usage

getGamePlayByPlay(season_code, game_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

game_code

One or more game codes as obtained from getCompetitionGames().

Value

Returns a list of two elements for the chosen games and seasons

  • PlayByPlaySummary. Overall information about the games, teams involved and status (live or not)

  • PlayByPlay. Detailed information about the games, particularly NumberOfPlay and PlayType

Glossary of PlayType:

PlayType PlayInfo
2PA Missed Two Pointer
2PM Two Pointer
3PA Missed Three Pointer
3PM Three Pointer
AG Shot Rejected
AS Assist
BP Begin Period
C Coach Foul
CCH Coach Challenge
CM Foul
CMT Technical Foul
CMTI Throw-In Foul
CMU Unsportsmanlike Foul
D Def Rebound
EG End Game
EP End Period
FTA Missed Free Throw
FTM Free Throw In
FV Block
IN In
O Off Rebound
OF Offensive Foul
OUT Out
RV Foul Drawn
ST Steal
TO Turnover
TOUT Time Out
TOUT_TV TV Time Out

Reference webpage: PlayByPlay

Examples

## Not run: 

PlayByPlay = getGamePlayByPlay(season_code = c("E2023", "U2023"), game_code = 1)

PlayByPlay$PlayByPlaySummary |> head(5)

PlayByPlay$PlayByPlay |> head(5)


## End(Not run)

Get game points

Description

[Experimental]

Usage

getGamePoints(season_code, game_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

game_code

One or more game codes as obtained from getCompetitionGames().

Value

Returns scoring information of each player for the chosen games and seasons (subset of play-by-play data). In particular:

  • NumberOfPlay. Reference id of the action (useful for join with results of getPlayByPlay)

  • CoordX and CoordY. Spatial coordinates of the shot

  • Zone. Area of the court of the shot

Reference webpage: PlayByPlay

Examples

## Not run: 

getGamePoints(season_code = c("E2023", "U2023"), game_code = 1)


## End(Not run)

Get player advanced statistics

Description

[Experimental]

Usage

getPlayerAdvanced(
  season_code,
  statistic_mode = c("perGame", "perMinute", "accumulated")
)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

statistic_mode

One or more aggregation modes of statistics.
Admitted values are perGame, perMinute and accumulated.

Value

Returns a summary tibble of advanced players statistics for chosen seasons.

Glossary of columns:

Column name Column extended name Column description
eFG% Effective field goal % Combined two- and three-point shooting effectiveness
TS% True shooting % Percentage of points vs. points attempted
OREB% Offensive rebound % Estimated % of available offensive rebounds obtained while on court
DREB% Defensive rebound % Estimated % of available defensive rebounds obtained while on court
REB% Rebound % Estimated % of available rebounds obtained while on court
AST/TO Assist to turnover ratio Ratio of assists made to turnovers committed
AST-R Assist ratio Estimated % of assists per player's offensive possessions
TO-R Turnover ratio Estimated % of turnovers per player's offensive possessions
2PTA-R Two-point attempts ratio Estimated % of two-point attempts per player's offensive possessions
3PTA-R Three-point attempts ratio Estimated % of three-point attempts per player's offensive possessions
FT-RT Free Throw rate Measure of free throw attempts vs. field goal attempts

Reference webpage: Stats

Examples

## Not run: 

getPlayerAdvanced(season_code = "E2023", statistic_mode = "perGame")


## End(Not run)

Get player miscellaneous statistics

Description

[Experimental]

Usage

getPlayerMisc(season_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

Value

Returns a summary tibble of miscellaneous players statistics for chosen seasons.

Glossary of columns:

Column name Column extended name Column description
DD2 Double-doubles Games with double-digit totals in two of: points, rebounds, assists, steals and blocks
TD3 Triple-doubles Games with double-digit totals in three of: points, rebounds, assists, steals and blocks

Reference webpage: Stats

Examples

## Not run: 

getPlayerMisc(season_code = "E2023")


## End(Not run)

Get player points statistics

Description

[Experimental]

Usage

getPlayerPoints(season_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

Value

Returns a summary tibble of points players statistics for chosen seasons.

Glossary of columns:

Column name Column extended name Column description
2PA-S Two-point attempts share Player's share of team's total two-point attempts
3PA-S Three-point attempts share Player's share of team's total three-point attempts
FTA-S Free throw attempts share Player's share of team's total free throw attempts
2PM-S Two-pointers made share Player's share of team's total two-pointers made
3PM-S Three-pointers made share Player's share of team's total three-pointers made
FTM-S Free throws made share Player's share of team's total free throws made
2P-RT Two-Point Rate % of a player's field goal attempts that are two-pointers
3P-RT Three-Point Rate % of field goal attempts that are three-pointers
%2P % of points from two-pointers % of points from two-point shots made
%3P % of points from three-pointers % of points from three-point shots made
%FT % of points from free throws % of points from free throws made

Reference webpage: Stats

Examples

## Not run: 

getPlayerPoints(season_code = "E2023")


## End(Not run)

Get player statistics

Description

[Experimental]

Usage

getPlayerStats(
  season_code,
  statistic_mode = c("perGame", "perMinute", "accumulated")
)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

statistic_mode

One or more aggregation modes of statistics.
Admitted values are perGame, perMinute and accumulated.

Value

Returns a summary tibble of players statistics for chosen seasons.

Glossary of columns:

Column name Column extended name
GP Game player
GS Game started
MIN Minutes played
PTS Points scored
2PM Two-pointers made
2PA Two-pointers attempted
2P% Two-point %
3PM Three-pointers made
3PA Three-pointers attempted
3P% Three-point %
FTM Free throws made
FTA Free throws attempted
FT% Free-throw %
OREB Offensive rebounds
DREB Defensive rebounds
TREB Total rebounds
AST Assists
STL Steals
TO Turnovers
BLK Blocks
BLKA Blocks against
FC Personal fouls committed
FD Personal fouls drawn
PIR Performance Index Rating

Reference webpage: Stats

Examples

## Not run: 

getPlayerStats(season_code = "E2023", statistic_mode = "perGame")


## End(Not run)

Team metadata

Description

[Experimental]

Retrieve contextual information about teams. Outputs may be required as arguments of other ⁠getTeam*⁠ or ⁠getPlayer*⁠ functions.

Usage

getTeam(season_code, team_code)

getTeamPeople(season_code, team_code)

getTeamGames(season_code, team_code)

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

team_code

One or more team codes as obtained from getCompetitionTeams().
Examples are ASV, MAD, ...

Value

For each function, returns a tibble with information about team, people or games of chosen season and team code.

Examples

## Not run: 

getTeam(team_code = "ASV", season_code = c("E2023", "E2022")) |> head(5)

getTeamPeople(team_code = "ASV", season_code = c("E2023", "E2022")) |> head(5)

getTeamGames(team_code = "ASV", season_code = c("E2023", "E2022")) |> head(5)


## End(Not run)

Get team lead statistics

Description

[Experimental]

Usage

getTeamLeadStats(season_code, phase_type = "All", subset = "All")

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

phase_type

One or more phase type codes as obtained from getCompetitionPhases().
Admitted values are RS for regular season, PO for playoffs and FF for final four. Default is All for all.

subset

One or more game subsets.
Admitted values are HomeGames, AwayGames, GamesWon, GamesLost, ResultsIn5Points (for games resulted in +/-5 points) and All. Default is All.

Value

Returns a list of elements for the chosen seasons, phase_type and subset.

  • TeamAccumulated. Total sum of statistics of all teams team

  • TeamAveragePerGame. Average per game of statistics of all teams

Glossary of columns:

Column name Column extended name
GP Game player
GS Game started
MIN Minutes played
PTS Points scored
2PM Two-pointers made
2PA Two-pointers attempted
2P% Two-point %
3PM Three-pointers made
3PA Three-pointers attempted
3P% Three-point %
FTM Free throws made
FTA Free throws attempted
FT% Free-throw %
OREB Offensive rebounds
DREB Defensive rebounds
TREB Total rebounds
AST Assists
STL Steals
TO Turnovers
BLK Blocks
BLKA Blocks against
FC Personal fouls committed
FD Personal fouls drawn
PIR Performance Index Rating

Reference webpage: TeamLead

Examples

## Not run: 

  TeamLeadStats = getTeamLeadStats(season_code = c("E2022", "E2023"), phase_type = "RS")

  TeamLeadStats$TeamAccumulated |> head(5)

  TeamLeadStats$TeamAveragePerGame |> head(5)


## End(Not run)

Get team statistics

Description

[Experimental]

Usage

getTeamStats(season_code, team_code, phase_type = "All")

Arguments

season_code

One or more season codes as obtained from getCompetitionHistory().
Examples are E2023 for Euroleague or U2023 for Eurocup 2023.

team_code

One or more team codes as obtained from getCompetitionTeams().
Examples are ASV, MAD, ...

phase_type

One or more phase type codes as obtained from getCompetitionPhases().
Admitted values are RS for regular season, PO for playoffs and FF for final four. Default is All for all.

Value

Returns a list of elements for the chosen teams and seasons:

  • PlayerAccumulated. Total sum of statistics by player

  • PlayerAveragePerGame. Average per game of statistics by player

  • PlayerAveragePer40. Average per 40 minutes of statistics by player

  • TeamAccumulated. Total sum of statistics of team

  • TeamAveragePerGame. Average per game of statistics of teams

Glossary of columns:

Column name Column extended name
GP Game player
GS Game started
MIN Minutes played
PTS Points scored
2PM Two-pointers made
2PA Two-pointers attempted
2P% Two-point %
3PM Three-pointers made
3PA Three-pointers attempted
3FG% Three-point %
FTM Free throws made
FTA Free throws attempted
FT% Free-throw %
OREB Offensive rebounds
DREB Defensive rebounds
TREB Total rebounds
AST Assists
STL Steals
TO Turnovers
BLK Blocks
BLKA Blocks against
FC Personal fouls committed
FD Personal fouls drawn
PIR Performance Index Rating

Reference webpage: Team

Examples

## Not run: 

  TeamStats = getTeamStats(team_code = "ASV", season_code = c("E2023", "E2022"), phase_type = "RS")

  TeamStats$PlayerAccumulated |> head(5)

  TeamStats$PlayerAveragePerGame |> head(5)

  TeamStats$PlayerAveragePer40 |> head(5)

  TeamStats$TeamAccumulated |> head(5)

  TeamStats$TeamAveragePerGame |> head(5)


## End(Not run)