← Back to projects

Mine Operations Data Pipeline

Transforming imperfect site data into a unified production, maintenance and safety dashboard.

Overview

Mine site data was spread across messy Excel files with no single source of truth. I built a pipeline that ingests, cleans and models the data, then brings it together in one Power BI dashboard.

The pipeline

01

Raw data

Production, maintenance and HSE data arrived as separate Excel files with inconsistent equipment IDs, mixed date formats, duplicate rows and missing shifts.

Raw production export with problems highlighted Raw maintenance downtime log with problems highlighted Raw HSE leading indicator matrix with problems highlighted

↓ Ingest

All Excel sheets are loaded into the raw layer unchanged, tagged with their source file and sheet.

View ingestion script →
02

Cleaning

The same records after cleaning in dbt. Every cell that was wrong in the raw data is shaded green: IDs standardised, names matched to the roster, dates and units fixed, duplicates removed, and new columns such as downtime hours and failed component worked out.

Production loads after cleaning, fixed values in green Maintenance work orders after cleaning, fixed values in green HSE leading indicators after cleaning, one row per person per day per metric

↓ Model

Cleaned tables are reshaped into fact and dimension marts in dbt, ready for reporting.

View dbt models →
03

Data marts

The clean data is organised into a star schema: three fact tables (loads, downtime and HSE) linked to shared date, equipment and people dimensions. Every report can be filtered the same way, and totals like tonnes are never double counted.

Star schema with fact tables for loads, downtime and HSE linked to date, equipment and people dimensions Sample rows from the fct_loads mart queried in DuckDB

↓ Visualise

The marts feed a Power BI report with KPIs calculated once in DAX and reused across every page.

04

Dashboard

One report covering production, maintenance and safety, filtered by the same date, crew and equipment slicers.

Production dashboard showing total tonnes, load count, payload compliance, strip ratio and tonnes by shift, destination and truck Maintenance dashboard showing physical availability, MTBF, MTTR, a downtime Pareto by component, bad-actor scatter and downtime heatmap HSE dashboard showing a crew safety scorecard, weekly hazard reports vs near misses, hazard reports by role and crew rankings

Key findings

What I'd improve