Bangladesh HR Compensation, Payroll, Attendance & Compliance Analytics
A structured, synthetic and portfolio-ready analytics environment for turning HR data into reliable workforce, payroll and compliance decisions.
Overview β’ Quick Start β’ Dataset Map β’ KPIs β’ Structure β’ Documentation
Important
Every employee, payroll and compliance record in this repository is synthetic demo data. The project is designed for learning, portfolio presentation, testing and decision-support prototypingβnot for storing real employee information.
HCC Analytics BD is an end-to-end HR analytics practice project built around the Bangladesh business context. It connects employee master data, monthly payroll, attendance, leave, benefits and compliance records so the same structured data can be analysed through multiple tools.
| Project dimension | Details |
|---|---|
| Primary domains | Compensation, payroll, attendance, leave, benefits and compliance |
| Analytics tools | Excel, Power BI, Looker Studio, Python and SQLite |
| Data status | 100% synthetic, portfolio-safe demo data |
| Main audiences | HR, Payroll, Finance, Compliance, Internal Audit and Management |
| Project outputs | Dashboards, clean CSV tables, KPI logic, SQL views, notebook analysis and documentation |
| Current version | v1.2.0 |
- How is total workforce cost changing over time?
- Which departments contribute most to payroll and overtime cost?
- Where are attendance, lateness or working-hours exceptions concentrated?
- Are eligible employees receiving the expected benefits?
- Which compliance actions are high-risk, overdue or repeatedly unresolved?
- How can HR, Finance and Management reconcile workforce and payroll information?
- Which insights should be escalated from operational review to management action?
| Component | What it provides | Best use |
|---|---|---|
| Excel dashboards | Two interactive dashboards with a guided starting point | Fast exploration, filtering and management presentation |
| BI-ready CSV datasets | Clean, connected HR tables with consistent analytical fields | Power BI, Looker Studio, Python and SQL import |
| Data dictionary | Field definitions, data types, BI roles and relationship guidance | Model design, documentation and validation |
| HR KPI logic | Payroll, headcount, attendance, leave, benefits and compliance calculations | Reusable business measures and audit checks |
| Python notebook and pipeline | Cleaning, validation and analytical workflow | Reproducible analysis and technical portfolio work |
| SQLite database | Relational tables, views and reusable SQL queries | Query practice and lightweight analytical applications |
| Power BI guidance | Data model, DAX measures, page blueprint and secure PBIX workflow | Professional dashboard development |
| Looker Studio guide | Calculated-field and reporting guidance | Lightweight browser-based dashboarding |
| Security automation | Dependency, static-analysis and repository checks | Safer project maintenance and release readiness |
| Visual usage guide | Supporting instructions and dashboard previews | Faster onboarding for new users |
The intended workflow is deliberately simple:
- Start with the structured synthetic CSV tables.
- Review field definitions in the data dictionary.
- Clean and validate data through Excel, Power Query or Python.
- Model relationships in Power BI, SQLite or another BI layer.
- Build explicit HR measures and exception checks.
- Present trends, drivers and risksβnot only charts.
- Convert findings into accountable management actions.
- Download or clone the repository.
- Open
excel/Bangladesh_HR_Compensation_Compliance_Dashboards.xlsx. - Begin from the
Start_Hereworksheet. - Use the month and business filters to explore dashboard outputs.
- Review calculations before replacing any synthetic records.
- Import the required CSV files from
data/. - Review
data/data_dictionary.csvbefore defining relationships. - Use
employees.csvas the primary employee dimension. - Connect payroll and attendance tables through
Employee_ID. - Add a calendar table for monthly and date-based analysis.
- Create explicit measures rather than relying only on automatic aggregation.
- Follow the detailed Power BI Usage Guide and the files in
bi/.
- Open the notebook and pipeline files inside
python_sqlite/. - Install the documented Python dependencies.
- Run validation and cleaning steps before analysis.
- Query
hr_analytics.sqliteor use the supplied SQL scripts and views. - Reconcile calculated results with the CSV or Excel totals.
git clone https://github.com/samusa099/hcc-analytics-bd.git
cd hcc-analytics-bd| File / table | Analytical role | Typical analysis |
|---|---|---|
employees.csv |
Employee dimension | Headcount, department, grade, location, gender, tenure and status |
payroll_monthly.csv |
Monthly payroll fact | Gross pay, net pay, overtime, allowances, deductions and payment timing |
attendance_leave_monthly.csv |
Attendance fact | Attendance, absence, lateness, working hours, leave and overtime |
benefits_enrollment.csv |
Benefits snapshot | PF, insurance, medical, transport and meal coverage |
leave_entitlement.csv |
Leave snapshot | Entitlement, use, balance and utilisation |
compliance_register.csv |
Compliance fact | Risk, status, owner, due date, corrective action and closure |
law_reference.csv |
Reference table | Compliance-control mapping and policy-review support |
data_dictionary.csv |
Metadata and documentation | Definitions, data types, relationships and expected analytical use |
hr_analytics.sqlite |
Relational analytics database | SQL queries, views and Python integration |
erDiagram
EMPLOYEES ||--o{ PAYROLL_MONTHLY : Employee_ID
EMPLOYEES ||--o{ ATTENDANCE_LEAVE_MONTHLY : Employee_ID
EMPLOYEES ||--|| BENEFITS_ENROLLMENT : Employee_ID
EMPLOYEES ||--|| LEAVE_ENTITLEMENT : Employee_ID
EMPLOYEES ||--o{ COMPLIANCE_REGISTER : Employee_ID
CALENDAR ||--o{ PAYROLL_MONTHLY : Month
CALENDAR ||--o{ ATTENDANCE_LEAVE_MONTHLY : Month
CALENDAR ||--o{ COMPLIANCE_REGISTER : Due_Date
Keep dimensions and fact tables separate. Avoid combining every source into one wide table, because duplicated employee-level values can create unreliable totals.
| KPI | Basic calculation | Why it matters |
|---|---|---|
| Active Headcount | Distinct active employees | Workforce size and capacity |
| Total Gross Payroll | Sum of gross pay | Total labour-cost monitoring |
| Total Net Payroll | Sum of net pay | Payroll funding and bank-disbursement planning |
| Average Gross Pay | Gross payroll Γ· paid employees | Department, grade and workforce comparison |
| Overtime Cost | Sum of overtime pay | Staffing pressure and cost control |
| Payroll Variance % | Current vs previous month payroll | Identifying cost movements and drivers |
| Attendance Rate | Present days Γ· working days | Workforce availability |
| Absenteeism Rate | Absent days Γ· working days | Attendance risk and operational disruption |
| Leave Utilisation % | Leave used Γ· entitlement | Leave planning and entitlement monitoring |
| Benefit Coverage % | Enrolled eligible employees Γ· eligible employees | Benefit administration and exception detection |
| Compliance Score % | Compliant checks Γ· total checks | Overall control effectiveness |
| Corrective Action Closure Rate | Closed actions Γ· total actions | Accountability and remediation progress |
For formulas, examples and implementation notes, use the Complete Dataset Usage Guide.
A strong BI implementation can be organised into the following pages:
- Executive Overview β headcount, payroll, attendance and compliance scorecard.
- Workforce Profile β department, grade, location, employment type and tenure.
- Payroll & Overtime β gross-to-net movement, cost drivers and exception review.
- Attendance & Leave β absence, lateness, leave usage and working-hours controls.
- Benefits Coverage β eligibility, enrolment and missing-coverage analysis.
- Pay Equity Review β pay distribution by grade, department, tenure and gender.
- Compliance & Risk β status, severity, due-date ageing, owner and closure tracking.
- Employee Drill-through β a detailed synthetic employee investigation page.
A portfolio dashboard should explain the business question, model, insight, limitation and recommended action. Attractive charts alone are not sufficient evidence of analytical skill.
hcc-analytics-bd/
βββ assets/readme/ README cover and workflow visuals
βββ data/ Clean CSV datasets and data dictionary
βββ excel/ Interactive Excel dashboards
βββ bi/ Power BI and Looker Studio modelling resources
βββ powerbi/ Power BI documentation and secure file workflow
βββ python_sqlite/ Notebook, Python pipeline, SQLite database and SQL
βββ guide/ Visual instructions and dashboard previews
βββ scripts/ Reproducible project-generation utilities
βββ docs/ Security and supporting project documentation
βββ README.md Main project landing page
βββ RELEASE_NOTES.md Version-specific changes
| You want to⦠| Start here |
|---|---|
| View the finished dashboard quickly | excel/ |
| Import clean data into a BI tool | data/ |
| Build Power BI measures and relationships | bi/ and powerbi/ |
| Run Python or SQL analysis | python_sqlite/ |
| Understand every field and calculation | DATASET_USAGE_GUIDE.md |
| Review visuals and usage instructions | guide/ |
| Review security decisions | SECURITY.md and docs/ |
- Complete Dataset Usage Guide β calculations, business use cases and multi-platform workflows.
- Power BI Folder Overview β Power BI resources and file-handling guidance.
- Detailed Power BI Usage Guide β model design, pages, KPIs, DAX, refresh, governance and validation.
- Data Model and Setup Guide β relationship and implementation guidance.
- Power BI DAX Measures β starter measure definitions.
- Release Notes β current release changes and readiness updates.
- Contributing Guide β contribution process and synthetic-data requirements.
- Code of Conduct β expected standards for participation.
- Security Policy β responsible disclosure and data-protection rules.
- Security Review & Closure β findings, remediation and residual controls.
This repository is structured as a public learning project, so its controls prioritise safe handling, reproducibility and transparency.
- Routine GitHub Actions workflows use read-only repository permission.
- Official GitHub Actions are pinned to immutable commit SHAs.
- Bandit and
pip-auditare included in automated checks. - Dependabot monitors Python and GitHub Actions dependencies.
- Cleaned CSV exports neutralise spreadsheet-formula prefixes.
- CODEOWNERS covers workflows, scripts, data tooling and binary analytics assets.
- Branch protection requires changes to pass through a Pull Request and expected status checks.
- Real employee records or CVs.
- National ID, passport, tax or bank information.
- Salary sheets containing identifiable employee data.
- Credentials, API keys, tokens or connection strings.
- Confidential company policies, legal files or investigation records.
When adapting this project for an organisation, apply role-based access, data minimisation, controlled storage, retention rules and a formal approval process.
This project can demonstrate the ability to:
- translate HR questions into measurable KPIs;
- organise multi-table workforce data into a reusable analytical model;
- clean and validate HR data across Excel and Python;
- write SQL queries and analytical views;
- build management dashboards in Excel and Power BI;
- interpret payroll, attendance and compliance exceptions responsibly;
- document assumptions, limitations and data-protection controls;
- communicate findings to HR, Finance, Audit and senior management audiences.
- Problem: Explain the HR or compliance decision that needs support.
- Data model: Show how employee, payroll, attendance and compliance tables connect.
- Insight: Present the key trend, driver or exception.
- Action: Recommend a realistic owner, timeline and follow-up measure.
This repository is a learning, portfolio and decision-support template. It is not legal, payroll, tax or regulatory advice.
Before applying any calculation in a live organisation, verify:
- the latest Bangladesh labour requirements;
- applicable sector wage gazettes;
- EPZ or non-EPZ applicability;
- current NBR income-tax rules;
- overtime and working-hour requirements;
- company policy, employment contracts and approved payroll practice.
Synthetic examples and configurable formulas must never replace professional legal, tax, payroll or compliance review.
- Dataset and documentation: Creative Commons Attribution 4.0 β see
LICENSE. - Python, SQL and supporting code: MIT β see
LICENSE-CODE.
Musa
HR Professional β’ HR Analytics Learner β’ Bangladesh
People data becomes valuable only when it supports a clear, responsible decision.
β Star the repository if it supports your HR analytics learning or portfolio work.