⛏️ Data Warehouse Analítico -- Minería Chile

A local dbt + DuckDB warehouse for Chilean copper mining. The real layer is built from Cochilco's 2000-2025 statistical yearbook; a second, simulated layer unifies flotation, truck maintenance and safety at shift grain, because no public shift-level data exists.

This page shows the project's results. The methodology, the design decisions and the limitations are documented in the repository's README.

0. Real data: Chile's copper sector, 2005-2024

Chile's copper sector indexed to 2005
What the real layer shows (2005 -> 2024):
Copper output by mine in 2025
In 2025, Escondida alone produced 25.0% of Chile's copper, and Codelco's share fell from 32.5% (2005) to 24.3%.

Real electricity prices

Copper mining's electricity at the real spot price
The electricity copper mining used each year (Cochilco) valued at the real hourly marginal cost of Chile's grid, read from the coordinator's daily reports. At Crucero's spot price it fell from USD 518 to 262 per tonne of copper between 2022 and 2024 while consumption rose 7%. In the north, night power cost USD 73-117/MWh more than solar-hours power, against USD 30-53/MWh in the centre-south. A spot-price opportunity cost, not the contract tariffs mines pay.

Everything below this point is the simulated site layer (fixed seed).

7. Validated results

Safety incidents against the equipment KPI, decomposed
This is the figure that justifies the whole warehouse. Shifts with a safety incident average 66.78% OEE against 70.47% for clean shifts, a 3.69-point gap — and the decomposition shows the gap flows through the Quality factor alone (100.00 → 95.47), with availability moving −0.37 pp and performance −0.18 pp, both noise.
Risk level distribution and mean OEE per level
Mean OEE falls monotonically across risk levels — 70.47 / 69.47 / 65.00 / 55.64, a 14.8-point spread from Bajo to Crítico.
KPI distributions across 540 shifts
OEE spans 53.2 points across shifts and never exceeds 100%, the arithmetic sanity check for a product of three bounded factors. Recovery spans only 4.6 points inside the 81–86% band that is realistic for copper flotation — and its range is the more meaningful of the two, because recovery uses the standard two-product metallurgical formula rather than a project-defined composite.
Label coverage of the ML-ready views
Both ML views expose an explicit target, so a model trains against them with no separate feature-engineering step. The 9 unlabelled maintenance rows are each truck's last observed shift, where there is no next shift to label — expected, not missing data.