build_anchor.py → anchor.json.
Why not imports + recycling? The full material balance is exports = production + imports + recycling − consumption − losses. But the anchor answers a narrower question — whose mine did this come from? — not “how much can this country ship?” Imports are deliberately excluded: if China refines imported Congolese cobalt, that cobalt is Congo’s origin, not China’s — adding imports would re-create the very origin gap we correct. Re-exported imports still show up, as the review flag (a country exporting more than it makes minus uses). Recycling IS included (the R term): a country’s own recycling meets part of its use, so only (1−R) of consumption draws on primary supply — R is an approximate world recycled share (USGS/EU CRM), 0 where negligible. The honest remaining gaps are losses and stock changes, which are poorly measured everywhere.
Why this is the moat
Mirror-trade reconciliation (matching what exporters and importers each report) is well-trodden. Constraining it with physical production and an independent consumption estimate is not — and it is exactly what fixes the atlas’s hardest problem: the origin gap, where a material’s true source disappears from trade because it is refined and re-exported by someone else (DR Congo’s cobalt fronted by Chinese refiners; Indonesia’s nickel; South Africa’s platinum). The anchor puts the origin back, not by assertion but by a bound the data has to respect. Two honest boundaries: (1) stage matching — the constraint holds only where the mined form is the traded form (lithium spodumene→carbonate, graphite flake→processed need the two-stage version, the next build); and (2) the consumption term only bites where the mining country is also large in the host industry. And here is the honest limit: modelled consumption is a country’s share of the driver activity at uniform intensity, so a country’s consumption share simply is its activity share. That means the bound bites for China (fluorspar, tungsten, phosphate) because China is large in every heavy industry — a fact about industrial scale, not a discovered property of these supply chains — and it cannot detect a country using more or less of a material than its industrial size implies. Everywhere else the mine leader is a small industrial consumer, so the repair rests on production alone. The Bind Δ column above says which is which, row by row — that transparency is the point, not a general claim to “obey physics.” See the consumption input →