Portfolio Showcase ยท Data Engineering

Lyra EAP
Intelligence Platform

Production-grade dimensional data warehouse and ML platform for Employee Assistance Programme analytics โ€” built on Snowflake with SCD Type 2, 1.4M+ rows, and three predictive models.

1.4M+
Total Rows
16 Tables
Star Schema
3 ML Models
Predictive Analytics
POPIA / GDPR
Compliance Layer

Platform Overview

What Was Built

A complete end-to-end analytics solution for an EAP (Employee Assistance Programme) provider, modelled after Lyra Health's corporate wellbeing platform.

668K
Counselling Sessions
65.8%
Case Resolution Rate
74 min
Avg Session Duration
46.4%
High / Critical Risk Cases

Business Context

Lyra Health operates a B2B EAP model โ€” corporate clients contract Lyra to provide mental health support to their employees. The analytics platform tracks session outcomes, employee wellbeing trends, clinical risk, and commercial performance across 16 corporate clients spanning Financial Services, Telecommunications, Healthcare, and the Public Sector.

Technical Stack

  • ๐Ÿ— Snowflake โ€” primary DW with DDL, staging, and production schemas
  • ๐Ÿ”„ SCD Type 2 โ€” DimEmployee and DimConsent with full history tracking
  • ๐Ÿ Python / sklearn โ€” 3 ML models for clinical risk, resolution, escalation
  • ๐Ÿ“Š Excel โ€” 5-tab KPI workbook with client performance pivots
  • ๐Ÿ—บ Leaflet.js โ€” interactive SA facility map with 767 locations

Data Architecture

Star Schema Design

16-table Kimball star schema with two SCD Type 2 dimensions for GDPR/POPIA-compliant change tracking.

DimDate          โ”€โ”ฌโ”€ FactCounsellingSessions โ”€โ”€ DimServiceType โ”€โ”€ DimIssueCategory
                  โ”‚          โ”œโ”€โ”€ DimClientCompany โ”€โ”€ DimCountry โ”€โ”€ DimCurrency
                  โ”‚          โ”œโ”€โ”€ DimFacilityGeography  (767 global locations)
                  โ”‚          โ”œโ”€โ”€ DimCounsellor
                  โ”‚          โ”œโ”€โ”€ DimEmployee_SCD2        โ—„ SCD Type 2 โ€” role/dept history
                  โ”‚          โ””โ”€โ”€ DimConsent_SCD2         โ—„ SCD Type 2 โ€” GDPR audit trail
                  โ”œโ”€ FactMedicationSales โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ DimMedication  (750K rows)
                  โ””โ”€ FactPatientExperience โ”€โ”€โ”€โ”€โ”€โ”€โ”€ DimServiceType (20K rows)
TableLayerRowsDescriptionKey Design Choice
FactCounsellingSessionsFACT668,293Core EAP session grainIncludes RiskScore, RevenueZAR, escalation flags
FactMedicationSalesFACT750,000Pharmacy transactionsSupports formulary cost analysis
FactPatientExperienceFACT20,000NPS + satisfaction surveysLinked to service type for quality scoring
DimEmployee_SCD2SCD295,168Employee historyTracks job role / department changes over time
DimConsent_SCD2SCD2475,840GDPR consent auditFull EffectiveFrom/To chain for compliance
DimFacilityGeographyGEO767Global facility locationsLat/lon + LyraFacilityType + PrivacyRegime
DimClientCompanyDIM16Corporate EAP clientsContractPackage drives revenue recognition
DimIssueCategoryDIM15Mental health taxonomyIssueGroup enables cross-category trending

Machine Learning

Predictive Analytics Models

Three sklearn models trained on session-level data to support clinical triage, resource planning, and early intervention.

Model 1 โ€” Risk Level Classifier
Classifies each session into Low / Medium / High / Critical risk tier
Random Forest ยท 150 trees
95.2%
Test Accuracy
94.8%
5-Fold CV
4 Classes
Risk Tiers
8
Features
Feature Importance
RiskScore
0.342
SessionDurationMinutes
0.198
IssueCategoryKey
0.141
Age
0.112
SessionCount
0.087
Business use: Enables real-time triage โ€” counsellors are automatically flagged when a session presents Critical risk signals, reducing manual review time by an estimated 40%.
Model 2 โ€” Case Resolution Predictor
Predicts whether a counselling case will be resolved within the current session
Gradient Boosting
65.0%
Test Accuracy
0.631
AUC-ROC
0.603
CV AUC
Binary
Classification
Business use: Sessions predicted as "unresolved" are flagged for automatic follow-up scheduling. Reduces administrative burden on counsellors and improves continuity of care.
Model 3 โ€” Escalation Risk Predictor
Identifies sessions at risk of emergency escalation before it occurs
Logistic Regression
99.4%
Test Accuracy
0.994
CV Accuracy
3.2%
Escalation Rate
Crisis
Protocol Trigger
Business use: Critical safeguarding mechanism โ€” the model triggers the Critical Incident Response protocol, connecting the employee to emergency services or a crisis counsellor within minutes.

Corporate Clients

EAP Client Portfolio

16 corporate clients across 5 countries on 4 contract packages โ€” from Digital First to Integrated Wellbeing.

Standard Bank

Financial Services ยท ZA ยท Enterprise EWP

South Africa's largest bank by assets. EAP covers 38,000+ employees across retail, commercial and investment banking divisions.

Discovery Limited

Financial Services ยท ZA ยท Integrated Wellbeing

Insurer and health platform. Integrated Wellbeing package aligns EAP with Discovery's own Vitality Health model.

Vodacom

Telecommunications ยท ZA ยท Enterprise EWP

Pan-African mobile operator. High-volume remote counselling via telephone and digital channels to distributed workforce.

MTN Group

Telecommunications ยท ZA ยท Enterprise EWP

Africa's largest mobile network. Critical Incident Support is a core service given MTN's operations in conflict-risk regions.

Sasol

Energy ยท ZA ยท Critical Incident Plus

Integrated energy and chemicals company. Critical Incident Plus package reflects high-risk operational environment at Secunda and Sasolburg plants.

Public Sector

Public Sector ยท ZA ยท Integrated Wellbeing

SA Government employer covering frontline civil servants. High burnout and trauma prevalence drives demand for crisis and grief support services.

Contract Packages

Enterprise EWP
Full suite: counselling, crisis, coaching, wellness events
Integrated Wellbeing
EAP + health risk assessments + organisational development
Critical Incident+
24/7 crisis response + trauma debriefing + mediation
Digital First
App-based counselling, self-guided tools, digital assessments

Key Findings

Platform Insights

Derived from 668,293 counselling sessions across 16 corporate clients and 5 countries.

Mental Health Dominates

40.8% of all sessions relate to Mental Health issues (Depression, Anxiety, Substance Abuse, Sleep Problems). Burnout and Work Conflict account for a further 25.4% under Workplace Wellbeing โ€” together representing two-thirds of total session volume.

Crisis Cases Under-Resourced

Crisis cases (Trauma, Critical Incident Trauma) represent 6.4% of sessions but trigger 100% of emergency escalations. The Critical Incident Response Centres carry disproportionate clinical load, particularly in mining and energy-sector clients.

SCD2 Enables Trend Analytics

DimEmployee_SCD2 tracks 95,168 employee records with full history. Analysis shows that employees who changed departments within 12 months have a 23% higher burnout presentation rate โ€” a finding not possible without SCD2 tracking.

Digital Channel Fastest Growing

Digital Care Hubs (154 globally) now handle 28% of sessions โ€” up from 11% in 2020. Clients on the Digital First package report 34% higher utilisation rates than Enterprise EWP clients, driven by mobile app adoption among under-35 employees.

Data Engineering Highlights

SCD Type 2
Both DimEmployee and DimConsent implement full Slowly Changing Dimension Type 2 with EffectiveFromDate, EffectiveToDate, and IsCurrent flags.
Dual Currency
All revenue stored in both local currency and ZAR (RevenueAmountLocal + RevenueAmountZAR). DimCurrency holds FX rates enabling consistent reporting across ZA, US, UK, AU, CA.
Privacy Regime
Each facility tagged with its applicable privacy regime: POPIA (ZA), HIPAA (US), PIPEDA (CA), GDPR (UK), Privacy Act (AU) โ€” enabling jurisdiction-aware data handling.
Ask about Lyra EAP
Hi! Ask me about the data model, the ML models, the clients, or the tech stack.