Dynamic Power BI Dashboard
The HR Analytics Project focuses on processing HR data to generate actionable insights. The project covers data cleaning, SQL database integration, and dynamic visualization using Power BI. The dashboard updates automatically, ensuring real-time insights for effective decision-making.
- Dynamic Power BI Dashboard: Automatically updated to reflect real-time SQL database changes.
- Key Insights:
- Attrition by Education, Age, Salary, and Job Role.
- Employee satisfaction trends over time.
- Department-wise performance and demographics.
- SQL Integration: Seamless data storage and processing with MySQL.
- Python Automation: Automates data cleaning and SQL integration tasks.
- Languages & Tools: Jupyter Notebook, Python, Power BI.
- Database: MySQL.
- Libraries:
pandas
,sqlalchemy
,datetime
.
- Connect to Google Drive: Use Python to programmatically access the dataset.
url1 = "https://drive.google.com/file/d/1ehMkFolQmCyCRO73LoWM78c4uVzj_VnI/view?usp=drive_link" url1 = 'https://drive.google.com/uc?id=' + url1.split('/')[-2] SatisfiedLevel = pd.read_csv(url1)
- Data Cleaning: Handle missing values, normalize fields, and prepare the dataset for analysis.
- Install MySQL Driver:
pip install pymysql
- Create SQL Connection in Python:
from sqlalchemy import create_engine engine = create_engine("mysql+pymysql://root:Mysql#[email protected]:3306/electric") conn = engine.connect()
- Load Cleaned Data into MySQL:
data1 = pd.read_csv('PerformanceRating.csv') data1.to_sql('PerformanceRating', engine, index=False, if_exists='replace') conn.close()
- Connect to MySQL Database: Configure Power BI to fetch data from the SQL database.
- Design the Dashboard: Build visualizations to showcase KPIs like:
- Attrition rates.
- Employee satisfaction trends.
- Demographic analysis.
Generate a DimDate
table to manage time-series data:
from datetime import datetime, timedelta
dates = pd.date_range(start="2000-01-01", end="2023-12-31", freq='D')
# ... Add required time columns ...
df.to_sql('DimDate', conn, index=False, if_exists='replace')
-
Home Dashboard
-
Attrition Summary
- Total Employees: 1,470
- Attrition Rate: 16.1%
- Gender Ratio: Male (651) | Female (675)
- Attrition by Education, Salary, and Job Role.
- Trends in employee attrition over the years.
- Employee Summary
- Total Employees: 1,470
- Attrition Rate: 16.1%
- Gender Ratio: Male (651) | Female (675)
- Job satisfaction levels by department.
- Monthly performance trends.
Run the project through Power BI to explore interactive dashboards and real-time analytics.
- Ankit Kumar (Team Lead)
- Varad Pemare
- Anurag Chakrabarty
This project is licensed under the MIT License.