mirror of
https://github.com/bitbaum/substrata.git
synced 2026-12-04 05:07:46 +01:00
* wip(resources): country panel data — OECD restrictions, sanctions, EIA energy, USGS producers Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(atlas): country panel with measured resources, producers, restrictions, sanctions and ranked peers Replaces "Similar geologies" (first eight countries sharing any directory resource, so Russia's peer was Timor-Leste) with "Peers on <resource>": the other leading producers by the same USGS/EIA column. Per resource the panel now shows production (latest and prior year, change), world rank and share, reserves and reserves-to-production, USGS Minerals Yearbook producers, corpus producer rows, OECD export restrictions, sanctions measures that name the resource, and USGS/corpus statements — or "not recorded". Adds /resources/[slug] (world ranking, HHI, CSV, restrictions by country) and computed country headlines in place of directory blurbs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
34 lines
2.0 KiB
TypeScript
34 lines
2.0 KiB
TypeScript
/**
|
||
* Methods for the per-country resource figures (lib/resources/*), spread into
|
||
* METHODS in lib/methods.ts. Share, HHI and reserves-to-production live there
|
||
* already and are reused; these are the ones the resource tables added.
|
||
*/
|
||
import type { Method } from './methods';
|
||
|
||
export const RESOURCE_METHODS = {
|
||
'world-rank': {
|
||
title: 'World rank',
|
||
formula:
|
||
'Position of a country when the countries USGS lists individually are sorted by the same column, largest first; equal values share a rank.',
|
||
explanation:
|
||
'Only countries with their own row in the USGS table are ranked. Producers USGS folds into "Other countries" are not ranked, and a withheld (W) figure cannot be ranked, so the United States is often missing from a ranking it would place in. Rank 3 means third among those listed, not third in the world with certainty.',
|
||
code: ['lib/resources/choropleth.ts', 'research/usgs-mcs.json'],
|
||
},
|
||
'production-change': {
|
||
title: 'Change on the year before',
|
||
formula:
|
||
'Latest year ÷ the year before − 1, same country, same column of the same table (USGS or EIA).',
|
||
explanation:
|
||
'USGS publishes the latest year as an estimate (marked e) and revises it the following February, so a change computed on it is provisional. No change is shown when either year is withheld, missing or zero.',
|
||
code: ['lib/resources/country.ts'],
|
||
},
|
||
'resource-significance': {
|
||
title: 'Which resources a country is listed for first',
|
||
formula:
|
||
"A country's resources are ordered by its largest share of world output on any production column of each table (e.g. palladium within PGMs).",
|
||
explanation:
|
||
'An ordering, not a score: it says where the country weighs most in world supply on the published figures. Resources with reserves but no production sort last; resources the directory names but no table lists are shown apart, never as zero.',
|
||
code: ['lib/resources/country.ts'],
|
||
},
|
||
} as const satisfies Record<string, Method>;
|