Skip to content

Latest commit

 

History

History
98 lines (72 loc) · 4.63 KB

README.md

File metadata and controls

98 lines (72 loc) · 4.63 KB

NBA all-time points analysis API 🏀


About the API

Working with data from the National Basketball Association all-time points leaders table. Have you ever wondered who is the player with most points on the NBA? Or how long will Lebron take to become the leader? Or just curiosity about your favorite players statistics? Well, you are in the right place. By this API we can get insights from many basketball players and how they made/are making impact on the league.


How to use

Libraries needed

pip install pandas
pip install time
pip install re
pip install selenium

Installing the API

pip install NBA-AllTimePTS-API

Importing the API

from NBA_AllTimePTS_API import Stats

Example of use

Screen Shot 2021-11-30 at 15 42 40


*On March 19th 2022, LeBron James became the second All-time points leader in regular seasons surprasssing Karl Malone. *On February 7th 2023, LeBron James became the All-time points leader in regular seasons surprasssing Kareeem Abdul-Jabbar.

Methods

Method: What the method does:
get_table(driver, n_pages) Returns a dataset with the players data by the number of pages you insert
get_player(player_name) Returns information of a specific player
top3Chart() Returns the top 3 all-time points leaders of NBA
isLebronLeader() Returns how many points and games LeBron needs to become the all-time points leader or if he has already become the leader
bestTS() Returns the player with the best TS% and their table Ranking position
bestFG() Returns the player with the best FG% and their table Ranking position
best3P( , minimumAttempts=100) Returns the player with the best 3P% and their table Ranking position
bestFT() Returns the player with the best FT% and their table Ranking position
overallStats( , player_name) Returns the MPG, PPG, RPG, APG, SPG and TOPF of a specific player
overallRebounds( , player_name) Returns the % of offensive and defensive rebounds of a specific player
tovPercent( , player_name) Estimate percentage of turnovers per 100 plays by a specific player
EFG( , player_name) Returns the Effective Field Goal Percentage of a specific player
PER( , player_name) Returns the Player Efficiency Rating of a specific player
mostRebounds() Returns the player with the most Rebounds and their table Ranking position
mostAssists() Returns the player with the most Assists and their table Ranking position
mostSteals() Returns the player with the most Steals and their table Ranking position
mostBlocks() Returns the player with the most Blocks and their table Ranking position
mostTurnovers() Returns the player with the most Turnovers and their table Ranking position
bestOffensivePlayer() Returns the best Offensive Player and their table Ranking position
bestDefensivePlayer() Returns the best Defensive Player and their table Ranking position

Parameters:

  • driver= The webdriver you wish to use(I.e: Chrome, Firefox etc.)
  • n_pages= Number of pages of data you want.
  • player_name= Name of the player you want.
  • minimumAttempts = This is a optional parameter, if not given: by deafault it will be 100.


Github Repository

Repository with the documentation and examples of how to use the package.


Reference