feat: Add basic Flask frontend for NBA stats viewing#9
Merged
Conversation
This commit introduces a Flask web application to display NBA player statistics for the 2024-2025 season.
Key features of the frontend include:
1. **Application Structure (`frontend/`):**
* Basic Flask app (`app.py`) with routes for different views.
* HTML templates (`templates/`) for rendering pages, including a base layout for navigation.
2. **Data Handling (`frontend/app.py`):**
* Loads and prepares data from the 2024-2025 season CSV files (`PyScripts/nba_*.csv`).
* Merges per-game, advanced, and shooting stats into a comprehensive DataFrame.
* Performs basic data cleaning and type conversion.
3. **Views Implemented:**
* **Home Page (`/`):** Welcome page with navigation.
* **League Leaders Page (`/leaders`):** Displays tables of top 10 players for PTS, AST, TRB, PER, and WS, with appropriate filtering for meaningful leaderboards.
* **Shooting Performance Page (`/shooting`):** Displays tables for top shooters (3P%, FG% 0-3ft, Corner 3P%, eFG%, TS%) and a histogram of league-wide average shot distance.
4. **Layout and Styling:**
* A base HTML template provides consistent navigation.
* Basic CSS styling is included for readability.
5. **Documentation (`README.md`):**
* Updated to include a new section detailing the Flask frontend, its features, and step-by-step instructions on how to set up the environment and run the application.
This provides a user-friendly way for you to interact with some of the key analytics derived from the scraped player data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a Flask web application to display NBA player statistics for the 2024-2025 season.
Key features of the frontend include:
Application Structure (
frontend/):app.py) with routes for different views.templates/) for rendering pages, including a base layout for navigation.Data Handling (
frontend/app.py):PyScripts/nba_*.csv).Views Implemented:
/): Welcome page with navigation./leaders): Displays tables of top 10 players for PTS, AST, TRB, PER, and WS, with appropriate filtering for meaningful leaderboards./shooting): Displays tables for top shooters (3P%, FG% 0-3ft, Corner 3P%, eFG%, TS%) and a histogram of league-wide average shot distance.Layout and Styling:
Documentation (
README.md):This provides a user-friendly way for you to interact with some of the key analytics derived from the scraped player data.