# NBA Fantasy Basketball Assistant
***
π _A full-stack AI application for fantasy basketball enthusiasts._ π
![9ed13d1846a5f262edaea59c29483c02](https://github.com/naishasinha/NBA-Fantasy-Assistant/assets/117387359/b33e4381-c769-42e4-b8f5-d794aebb213b)
***
## Overview
The NBA Fantasy Basketball Assistant is a full-stack AI application designed to provide in-depth analysis and actionable insights for fantasy basketball enthusiasts. Leveraging detailed NBA game statistics, this tool aims to enhance users' decision-making by predicting team performances, analyzing matchups, and offering personalized recommendations.
## Core Features
### π Team Performance Analysis
β **Historical Data Insights**: _Analyze historical data over the last nine seasons to predict future team performances._
β **Current Form**: _Calculate rolling averages of key statistics over recent games to determine current form and identify trends._
### π Matchup Analyzer
β **Historical Matchup Performance**: _Analyze historical matchups between teams to predict outcomes and evaluate matchup strengths and weaknesses._
β **Performance Trends Against Specific Opponents**: _Highlight performance trends against specific types of opponents (e.g., teams with strong defense or high-scoring offenses)._
### π Customizable Recommendations
β **User Criteria-Based Recommendations**: _Allow users to prioritize specific statistics and receive tailored recommendations._
***
## Project Details
### Development Progress:
This project is designed for continuous enhancement and improvement. Therefore, a chart has been added to track the development and completion progress of each project element, highlighting the future updates I plan to implement for improvement.
| Component | Progress |
| -------- | ------- |
| App Interface (Full-Stack) | β
Completed UI/UX Design Implementation
β
Client successfully displays and interacts with server mock data
β
Seamlessly implements dynamic internal page changes |
| Machine Learning Prediction Model | β
Initial model complete with 63% accuracy
β οΈ Working to [improve current accuracy](https://github.com/naishasinha/Fantasy-Basketball/issues/1) |
| Integration of ML Results and Pandas Manipulation Data with Server | β οΈ In Progress |
| π
**Current Task** π
|
| -------- |
| Develop a JSON file that generates up-to-date performance and matchup analysis based on the mock data format. |
### Noteworthy Description Files:
ML-Model |
-
ML-Model README.md file:
Provides details and explanations behind the web scraping and predictor model training process
|
Client |
-
Client README.md file:
Provides details on navigating and utilizing the React App
|
### Full Directory Tree:
```
nba-fantasy-assistant/
βββ ML-model/
β βββ README.md
β βββ Create_NBADataset.ipynb # Code for creating CSVs (Jupyter Notebook)
β βββ Retrieve_NBAData.ipynb # Web Scraping Code (Jupyter Notebook)
β βββ NBA_PredictionModel1.ipynb # Base ML Model
β βββ nba_data/
β β βββ .ipynb_checkpoints/
β β βββ scores/ # All individual box scores across seasons
β β βββ standings/ # All standings (by month) across seasons
β β βββ ... # Other miscellaneous csv files
βββ client/
β βββ public/
β βββ src/
β β βββ components/
β β β βββ Form.css
β β β βββ Header.css
β β β βββ Modal.css
β β β βββ Modal.js
β β β βββ NavButton.css
β β β βββ NavButton.js
β β βββ images/ # All images used for app
β β βββ pages/
β β β βββ Home.js # Main (Home) Page
β β β βββ Home.css
β β β βββ TeamPerformanceAnalysis.js
β β β βββ MatchupAnalyzer.js
β β β βββ FantasyRecommendations.js
β β βββ App.js
β β βββ index.js
β β βββ index.css
β βββ package.json
β βββ README.md # React App Explanation
βββ server/
β βββ index.js
β βββ package.json
βββ README.md # Main Project File README
βββ LICENSE
```
### Tech Stack:
**Other tools for ML Model:**
`NumPy`
`Pandas`
`Scikit-learn`
`BeautifulSoup`
### Running the Application:
Main Directory Command: `cd NBA-Fantasy-Assistant`
#### Front-End
1. Navigate to the `client` directory:
```
cd client
```
2. Install dependencies:
```
npm install
```
3. Start the React App:
```
npm start
```
#### Back-End
1. Navigate to the `server` directory:
```
cd server
```
2. Install dependencies:
```
npm install
```
2. Start the server:
```
node index.js
```
**Open your browser and go to `http://localhost:3000` to view the application.**
***
#### This project is [licensed](LICENSE) under the `MIT License`.
##### _Copyright (c) 2024 Naisha Sinha_
***