Code Monkey home page Code Monkey logo

nba-statisticapi's Introduction

NBA-StatisticAPI

๐Ÿ€ Here you can compare and analyze data from NBA players and teams.

Python Flask Pandas Streamlit NBA

Description

Welcome to the NBA-StatisticAPI API documentation! This API is designed to provide quick and easy access to various NBA-related statistics and information. The NBA-StatisticAPI consumes data from the public API available at https://github.com/swar/nba_api, which offers a wide range of up-to-date resources on players, teams, career statistics, draft history and more.

Installation

To install and run the API, follow the steps below:

  1. Clone the repository:
git clone https://github.com/rychardbarros/NBA-StatisticAPI.git
cd NBA-StatisticAPI
  1. Create and activate a virtual environment (optional but recommended):
pip install virtualenv
python -m venv venv

# On Windows
venv\Scripts\activate

# On Linux/Mac
source venv/bin/activate
  1. Install the dependencies:
install -r requirements.txt

How to Use

To run the NBA-StatisticAPI, follow the steps below:

Open a terminal or command prompt. Navigate to the directory where the API is located:

cd path/to/the/NBA-StatisticAPI/src/api

Start the API server by running the routes.py file:

python routes.py

In another terminal or command prompt window, navigate to the root directory of the API:

cd path/to/the/NBA-StatisticAPI

Run the Streamlit app with the following command:

streamlit run main.py

Now, you can explore and interact with the NBA-StatisticAPI to get detailed information about players, teams, career statistics, and more related to the NBA. Have fun exploring the data and creating exciting applications for basketball fans! Endpoints

The API provides the following endpoints for accessing NBA data:

/player/{id} (GET Method): Returns the career statistics of a specific player based on the provided player ID.

/player/name/{id} (GET Method): Returns information about a specific player based on their full name.

/player/{id}/vs/{vs_id} (GET Method): Compares the statistics of two players based on their IDs.

/team/all (GET Method): Returns a list of all NBA teams.

/team/details/{id} (GET Method): Returns details about a specific team based on its ID.

/draft/all (GET Method): Returns information about all NBA drafts.

/franchise/all (GET Method): Returns information about all NBA franchises.

/team/stats/{id} (GET Method): Returns the statistics of a specific team based on its ID.

Layout

License ๐Ÿ“š

MIT license.

Made by Rychard Barros

nba-statisticapi's People

Contributors

rychardbarros avatar

Stargazers

 avatar Renan Pereira avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.