Skip to content

Comments

feat: Add basic Flask frontend for NBA stats viewing#9

Merged
ruwzeta merged 1 commit intomainfrom
feature/2025-stats-and-analytics
May 23, 2025
Merged

feat: Add basic Flask frontend for NBA stats viewing#9
ruwzeta merged 1 commit intomainfrom
feature/2025-stats-and-analytics

Conversation

@ruwzeta
Copy link
Owner

@ruwzeta ruwzeta commented May 23, 2025

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 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.
@ruwzeta ruwzeta merged commit 800e7bf into main May 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant