Skip to main content

Data about the NBA All-Time points leaders table.

Project description

NBA all-time points analysis API 🏀

About the API | How to use | Reference | Documentation | Github


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

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
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.

  • https://github.com/AnabeatrizMacedo241/NBA_AllTimePTS_API

Reference

  • https://www.nba.com/stats/alltime-leaders/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NBA_AllTimePTS_API-0.0.6.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file NBA_AllTimePTS_API-0.0.6.tar.gz.

File metadata

  • Download URL: NBA_AllTimePTS_API-0.0.6.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for NBA_AllTimePTS_API-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9e396efd072832b554b9215465be88a7e2ad8652165321032f40f62e290ff014
MD5 bb79f4f5dfa9c7cd23b56e86d89e6f70
BLAKE2b-256 cd82f234240755efa308513979bca7211d1e2347bb33e0b2f0bc9a8efd82c87c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page