📊 Day 9: Dynamic Dashboard Development
📌 Overview
Day 9 focuses on building dynamic, live-connected HR analytics dashboards using front-end web technologies. Learn to create interactive dashboards that automatically update when backend data changes, using Google Sheets as a live database.
🎯 Key Learning Objectives
- Front-End Development: Master HTML, CSS, and JavaScript for dashboard creation
- Live Data Integration: Connect dashboards to Google Sheets for real-time updates
- Data Visualization: Create multiple chart types for comprehensive analytics
- KPI Design: Build effective key performance indicator cards
- Responsive Design: Ensure dashboards work across devices
💻 Front-End Technologies Explained
1. HTML (HyperText Markup Language)
Purpose: Structure and content of web pages
Role in Dashboard: Creates the skeleton - containers, divs, tables, canvas elements for charts
Creating a section for PF compliance tracking using HTML structure with proper semantic tags for better accessibility.
2. CSS (Cascading Style Sheets)
Purpose: Styling, layout, and visual design
Role in Dashboard: Colors, fonts, spacing, animations, responsive grid layouts
TCS uses blue (#0066CC), Infosys uses blue and orange. Your dashboard can use company-specific color schemes for branding consistency.
3. JavaScript
Purpose: Interactivity, data processing, and dynamic updates
Role in Dashboard: Fetch data, calculate KPIs, create charts, handle user interactions
🔄 Complete Workflow
Create summary notes of HR analytics concepts, KPIs, and metrics to track
Use Claude to expand summaries into comprehensive learning materials with examples, code snippets, and Indian context
Organize and structure content in Notion for team collaboration and easy reference
Transform notes into interactive HTML dashboards with live data connections
Publish the HTML dashboard code to Blogspot or other blogging platforms
Make your dashboard publicly accessible and share with stakeholders
📊 Essential HR Dashboard Components
KPI Cards to Include:
- 👥 Total Employees: Current headcount
- 📉 Attrition Rate: Percentage of employees leaving
- 💰 Average Salary: Mean monthly income in INR
- ⏱️ Average Tenure: Years at company
- ⭐ Job Satisfaction: Average rating (1-5 scale)
- ⚖️ Gender Ratio: Male to Female percentage
- 🎓 Education Distribution: Qualification breakdown
- 🏢 Department Strength: Employees per department
Charts for Comprehensive Analysis:
- Pie Chart: Department distribution, Education field
- Bar Chart: City-wise employees, Age distribution
- Stacked Bar: Attrition vs Active by department
- Line Chart: Attrition trends over time
- Doughnut Chart: Marital status, Job roles
- Horizontal Bar: Job satisfaction scores
🔗 Google Sheets Live Integration
URL Format for Live Data:
JavaScript Libraries Required:
- PapaParse: Parse CSV data from Google Sheets
- Chart.js: Create beautiful, responsive charts
- Fetch API: Native JavaScript for HTTP requests
Wipro's HR team maintains a Google Sheet with 5,000+ employee records across Bangalore, Hyderabad, and Pune offices. The dashboard updates every hour automatically, showing:
- Real-time headcount by location
- Monthly attrition trends
- Recruitment pipeline status
- Training completion rates
🎨 Design Best Practices
Color Psychology in Dashboards:
- Turquoise (#40E0D0): Trust, clarity, professionalism
- Gold (#FFD700): Success, achievement, premium quality
- Red: Alerts, high attrition, critical issues
- Green: Positive metrics, growth, satisfaction
Responsive Design Principles:
- Use CSS Grid or Flexbox for flexible layouts
- Set breakpoints for mobile (768px), tablet (1024px), desktop
- Ensure charts remain readable on small screens
- Test on actual devices (iPhone, Android, iPad)
💡 Indian HR Context Examples
Example 1: TCS Bangalore Office Dashboard
Dataset: 2,500 employees
Key Metrics Tracked:
- Attrition Rate: 11.2% (Industry avg: 15-18%)
- Average Salary: ₹8,50,000 per annum
- Gender Ratio: 32:68 (Women:Men) - Working towards 50:50
- Average Age: 29.5 years
- Projects across verticals: Banking (40%), Healthcare (25%), Retail (35%)
Dashboard Updates: Real-time via Google Sheets API, refreshes every 30 minutes
Example 2: Startup HR Analytics (50-person team)
Company: EdTech startup in Gurugram
Dashboard Features:
- Stock options tracking for retention
- Work-from-home vs Office attendance patterns
- Employee NPS score: 8.2/10
- Hiring velocity: 5 new hires per quarter
- Cost per hire: ₹85,000 (including recruitment fees)
Example 3: Manufacturing Company - Chennai
Company: Automotive parts manufacturer, 800 employees
Unique Metrics:
- Blue collar vs White collar ratio: 70:30
- Shift-wise attendance tracking (3 shifts)
- Safety training completion: 95%
- Contract vs Permanent: 40:60
- Tamil Nadu labour compliance dashboard
✅ Practice Tasks
Build a simple HTML page with 6 KPI cards showing: Total Employees, Attrition Rate, Average Salary, Gender Ratio, Average Age, and Department Count. Use semantic HTML5 tags.
Apply turquoise and gold theme to your dashboard. Create hover effects on KPI cards, add gradients, and ensure responsive design for mobile devices.
Write JavaScript functions to calculate:
- Attrition rate from raw data
- Average salary by department
- Gender distribution percentage
- Age group categorization (20-30, 31-40, 41-50, 51-60)
Create a Google Sheet with sample HR data (minimum 50 records). Make it public and integrate it with your dashboard using PapaParse library. Verify that changing data in the sheet updates your dashboard.
Using Chart.js, create:
- Pie chart for department distribution
- Bar chart for city-wise employee count (Delhi, Mumbai, Bangalore, Hyderabad, Chennai, Pune, Kolkata)
- Line chart showing monthly attrition trend
Combine all elements into one comprehensive dashboard with:
- Header with company branding
- 8 KPI cards
- 6 different chart types
- Employee data table (top 20 records)
- Refresh button for manual updates
- Footer with credits
Create a specialized dashboard tracking Indian HR compliance:
- PF deductions by month
- ESI applicability tracking
- Professional Tax by state
- Gratuity eligibility count (5+ years tenure)
- Form 16 generation status
❓ FAQs for HR Analytics Professionals
- Never include sensitive PII (Aadhaar, PAN, personal phone numbers)
- Use employee IDs instead of names if possible
- Anonymize or aggregate salary data
- Consider using Google Apps Script to create a filtered view that only exposes necessary columns
- For truly sensitive data, implement backend authentication (requires server-side code)
- Maximum 10 million cells total
- Up to 40,000 rows recommended for good performance
- For larger datasets (100,000+ employees), consider Google BigQuery or a proper database
- Dashboard rendering may slow down with 10,000+ records - implement pagination or filters
- Add a JavaScript setInterval function (e.g., every 5 minutes)
- Balance between freshness and API rate limits
- Google Sheets doesn't have strict rate limits for public sheets, but avoid refreshing every second
- Include a manual refresh button for immediate updates
- Create filter UI elements (dropdowns, date pickers)
- Write JavaScript functions to filter the dataset
- Recalculate KPIs based on filtered data
- Update charts with new filtered data
- Example: Filter by "Department = IT" to see IT-specific metrics
- Recharts: React-based, modern, declarative
- D3.js: Most powerful, steep learning curve
- Plotly: Interactive, supports 3D charts
- Google Charts: Easy integration with Google ecosystem
- ApexCharts: Modern, feature-rich, good for real-time data
- Runs in the user's browser
- HTML, CSS, JavaScript
- Handles display, user interactions, simple calculations
- Limited security (anyone can view source code)
- Runs on a server
- Languages: Python (Flask/Django), Node.js, Java
- Handles databases, authentication, complex processing
- Secure (code not visible to users)
- Use responsive CSS (flexbox, grid, media queries)
- Set viewport meta tag: <meta name="viewport" content="width=device-width, initial-scale=1.0">
- Stack KPI cards vertically on small screens
- Reduce chart sizes for mobile (Chart.js responsive option)
- Use touch-friendly buttons (minimum 44x44 pixels)
- Test on actual devices: iPhone SE, Samsung Galaxy, iPad
- Immediate (Weeks 2-4): Advanced Chart.js, CSS animations, JavaScript ES6+
- Short-term (Months 2-3): React.js for complex UIs, Git for version control
- Medium-term (Months 4-6): Python for data analysis (Pandas, NumPy), SQL for databases
- Long-term (Months 7-12): Machine learning for predictive analytics (attrition prediction), Cloud deployment (AWS,
Comments
Post a Comment