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
What the real layer shows (2005 -> 2024):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
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
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.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.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.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.