HR Analytics with Python

HR Analytics is an intermediate-level course of 5 lessons (about 1 h 23 min), with 15 exercises and 15 quiz questions. Prerequisites: Business Metrics and KPIs. Exercises run in the browser, with nothing to install.

  • Business analytics
  • Intermediate
  • 5 lessons
  • 1 h 23 min
  • 15 exercises
  • Exercises run in the browser

The course in brief

This course applies data analysis to human resources, starting with what conditions everything else: confidentiality, pseudonymization and disclosure thresholds. You then calculate headcount and turnover, absenteeism, recruitment indicators and gender pay gaps with pandas, on fictitious data, while learning to present results that are accurate and respectful of people.

What you will be able to do

  • Prepare a minimized, pseudonymized HR extract and publish aggregates with a disclosure threshold
  • Calculate headcount, hires, exits, departure rate and turnover while specifying the definitions
  • Measure absenteeism by distinguishing frequency from duration, without exposing health data
  • Analyze time to hire and compare application sources
  • Calculate a raw pay gap and a gap for a comparable category and explain the composition effect

Syllabus: 5 lessons

    • Apply personal data protection principles to an HR analysis
    • Distinguish pseudonymization from anonymization and pseudonymize a file with a secret key
    • Publish aggregates without allowing a person to be re-identified (disclosure threshold)

    HR data confidentialityPseudonymizationAggregate disclosure threshold

  1. 02

    Headcount and Turnover

    18 min
    • Calculate headcount on a date and average headcount from hire and exit dates
    • Calculate a departure rate and a turnover rate while specifying the definition
    • Analyze turnover by department and spot early departures

    Headcount on a date and average headcountTurnover rateTenure and early departures

  2. 03

    Absenteeism: Rate, Frequency and Duration

    15 min
    • Calculate an absenteeism rate by relating absences to theoretical working time
    • Distinguish the frequency from the duration of absences
    • Present aggregated absence indicators while respecting the confidentiality of reasons

    Absenteeism rateFrequency and duration of absencesAbsence reasons and sensitive data

  3. 04

    Recruitment: Time to Fill, Application Funnel and Sources

    15 min
    • Calculate time to fill and summarize it with the median
    • Build the application funnel by source
    • Compare sources by conversion rate and cost per hire

    Time to fillApplication funnelCost per hire

  4. 05

    Pay Equity: Raw Gap, Gap for Comparable Roles and Limits

    20 min
    • Calculate a raw gender pay gap in mean and median
    • Calculate a gap for a comparable category and distinguish it from the raw gap
    • Present a pay equity analysis with its limits and confidentiality rules

    Gender pay gapComposition effectProfessional equality framework

Final project

Annual HR Review of a Fictitious Company

From a staff file, absences, applications and salaries generated in Python for a fictitious company of about 150 employees, produce a shareable annual HR review: data preparation (minimization, pseudonymization), headcount and turnover by department, absenteeism broken down into frequency and duration, recruitment indicators and pay equity analysis. All tables respect a disclosure threshold.

Deliverables

  • A reproducible Python script or notebook (fixed seed) with a pseudonymization step whose key is not in the code
  • The indicator sheets (formula, scope, period) for turnover, absenteeism and recruitment delays
  • The headcount, turnover and absenteeism tables by department, with headcounts displayed and small groups masked
  • The application funnel by source with cost per hire
  • The pay equity analysis: raw gaps, gap for a comparable category, excluded categories
  • A one-page summary note, with no individual data

Assessment criteria

  • No individual data or group below the threshold can be deduced from the deliverables
  • The indicator definitions are written down and applied consistently
  • Ratios are calculated on totals and accompanied by headcounts
  • The pay gap distinguishes the raw gap, the gap for a comparable category and the composition effect
  • Conclusions are cautious on small headcounts and oriented toward collective actions

Frequently asked questions

Does this course cover data protection?

Yes, it is the starting point: minimization, pseudonymization with a secret key, the difference from anonymization, disclosure thresholds and precautions around absence reasons. These rules come back in every lesson.

Does the course let you calculate the official professional equality index?

No. It presents the context and teaches you to carry out an internal analysis of pay gaps. The official index follows its own regulatory method, to be applied using the official texts and tools.

Do you need to be an HR specialist to take this course?

No. The definitions (headcount, turnover, absenteeism) are explained. You need the basics of pandas and the concepts from the Business Metrics and KPIs course (DA2).

Is the data used real?

No, all people and data are fictitious and built in the code.

This course, told for your job

Say what you want to be able to do: “HR Analytics” takes its place in your path, with examples from your field. The concepts stay those of the course.

The preview is free, and you can take the courses one at a time without paying. The path only contains lessons from the catalogue.