Skip to content

Calvinjmin/HoopStats

Repository files navigation

HoopStats

hoopstats can be accessed here on PyPi.

PyPI Version

This project serves as a proof of concept (POC) for web scraping NBA data from Basketball Reference. The primary motivation is to explore the intersection of data science and software engineering by building a reliable NBA-focused Python package. The long-term objective of this project is to evolve into the backend of a full-stack application, providing users with seamless access to NBA statistics through an intuitive and user-friendly interface.

Table of Contents

Features

  • Scrape NBA player statistics from Basketball Reference
  • Access detailed game logs and player splits
  • Convenient API for querying player and game data

Installation

To install HoopStats, you can use pip:

pip install hoopstats

Usage

Here's a basic example of how to use HoopStats:

from hoopstats import PlayerScraper

# Initialize the scraper with player names
player_scraper = PlayerScraper(first_name="Lonzo", last_name="Ball")

# Access the player's data
print(player_scraper.url)

# Access the player's game log stats, based on a given year
print(player_scraper.get_game_log_by_year(2024))

To review full functionality of the code, look under the services folder.

Testing

To run the tests for HoopStats, use the following command:

pytest --cov=.

Make sure to add tests for any new features or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

Author: Calvin Min (2024)

About

A small web-scrapping package for NBA Statistics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published