Web Report Dashboard - Python Dash
Dashboard Upload data


Dashboard




## Installation
1. **Install Dependencies**
```bash
pip install -r requirements.txt
flask==2.3.3
flask-cors==4.0.0
pandas==2.1.1
numpy==1.24.3
openpyxl==3.1.2
xlrd==2.0.1
werkzeug==2.3.7
streamlit==1.28.0
plotly==5.17.0
requests==2.31.0
```
2. **Create Upload Directory**
- Ensure the directory `D:\EDA\Project\HR` exists
- Or modify the `UPLOAD_FOLDER` path in `app.py` to your preferred location
## Running the Application
### Step 1: Start the Flask Backend
```bash
python app.py
```
The backend will run on `http://localhost:5000`
### Step 2: Start the Streamlit Frontend
```bash
streamlit run streamlit_dashboard.py
```
The frontend will open in your browser at `http://localhost:8501`
## Features
### Dashboard Capabilities
- **File Upload**: Upload Excel files with HR data
- **Demo Data**: Use built-in sample data for testing
- **Real-time Processing**: Instant data processing and visualization
- **Responsive Charts**: Interactive charts using Plotly
### Analytics Visualizations
1. **Recruiting Cost Breakdown** - Stacked area chart
2. **Cost Efficiency Analysis** - Scatter plot
3. **Gender Distribution** - Donut chart
4. **Separation Reasons** - Radar chart
5. **Average Fill Time Trend** - Area chart
6. **Race/Ethnicity Distribution** - Donut chart
### Key Performance Indicators
- Total Recruiting Cost
- Total Applicants
- Success Rate
- Average Fill Time
## Excel File Format
The application expects Excel files with the following sheets:
### Sheet: `recruiting_cost`
| Column | Description |
|--------|-------------|
| year | Year (e.g., 2021) |
| recruiter_salary | Recruiter salary cost |
| recruiter_fees | External recruiter fees |
| other | Other recruiting costs |
| total | Total recruiting cost |
| applicants | Number of applicants |
| success | Number of successful hires |
| cost_per_applicant | Cost per applicant |
| cost_per_success | Cost per successful hire |
### Sheet: `gender_stats`
| Column | Description |
|--------|-------------|
| gender | Gender (Male/Female) |
| count | Number of employees |
### Sheet: `race_stats`
| Column | Description |
|--------|-------------|
| race | Race/Ethnicity |
| count | Number of employees |
### Sheet: `quit_rate`
| Column | Description |
|--------|-------------|
| rate | Quit rate (decimal, e.g., 0.105) |
### Sheet: `avg_fill_time`
| Column | Description |
|--------|-------------|
| year | Year |
| days | Average days to fill position |
### Sheet: `separation_reasons`
| Column | Description |
|--------|-------------|
| reason | Separation reason |
| count | Number of separations |
## API Endpoints
### Flask Backen