Worked Examples

Developer reference for cross-country comparison — Global Impact Catalyst

Develop reproducible cross-country comparisons in Global Impact Catalyst using source-controlled World Bank indicators, consistent population and purchasing-power definitions, and governed analysis policies. This developer reference documents implemented GIC comparison contracts, versioned source lineage, security checks, and validation gates that prevent unsupported rankings and misleading conclusions.

ProductGlobal Impact CatalystComponentAnalysisUpdatedNovember 26, 2026Reading time24 minutes

Application: Global Impact Catalyst
Component: Analysis — Comparisons and Benchmarks
Article type: Developer reference
Source-reviewed product version: 2.0.0 (analysis repository 1.7.0)
Last verified installed version: Not established
Verification status: Published — verification pending
Estimated reading time: 22–26 minutes

Summary: Build reproducible international comparisons that preserve source vintages, PPP conventions, population denominators, eligible country membership, privacy, and publication controls. Includes actual GIC repository interfaces and a read-only World Bank WDI/UNdata test fixture.

Goal

Implement and assess a reproducible cross-country comparison in Global Impact Catalyst (GIC) that distinguishes national totals from per-person measures, preserves the exact indicators and data vintage, and produces an auditable descriptive result without implying causal superiority, scientific certification, or automatic publication approval. The acceptance criterion is at least two comparable country observations for each declared indicator and period, with documented source versions, a declared comparison policy, exclusions, calculation methods, and limitations.

This developer reference is source-reviewed, not a deployment manual for an independently verified installation. Use the documented Python contracts only where the installed release is confirmed; do not assume that the same operations are exposed through a particular WordPress screen, REST endpoint, or public API.

Requirements

Before constructing a comparison, record the research question, country codes, indicator codes and definitions, temporal coverage, units, underlying population, source and revision, expected comparison outputs, permitted audience, and reviewer. A minimal reproducible development environment requires Python 3, the pinned GIC source and migrations, an isolated test database, approved source material, and permissioned test identities. The accompanying CSV and offline validator can be run without database credentials and must not be treated as a live GIC acceptance test.

The reviewed source version is GIC v2.0.0 at commit e75808a0aa272656b1fdbacd2491c30fd6b987dc. Within that release, the comparison analysis module identifies itself as v1.7.0; program measurement is v1.5.0, and the governed unit/indicator registry is v1.4.0. The canonical impact calculation contract is v1.1.0. These component versions are not proof that any particular production installation runs them.

1. Intended analytical behavior

Cross-country comparison means comparing like-for-like indicators under an explicit methodological policy, not simply aligning bars from different nations. The baseline pipeline should bind each mark or result to a country, year, indicator definition, source version, measured value, unit, population basis, exclusion policy, and evidence status. Results should disclose whether they show an absolute total, per-capita quantity, rate, or PPP-adjusted economic value. A user must not be able to convert a difference in total size into a statement of superior per-person performance by changing a chart title.

Acceptable outputs include ratios, signed differences, normalized plots, and carefully qualified descriptive rankings. Unsupported outputs include claims of policy causality, generalized sustainability performance, welfare superiority, causal impact, or independent scientific assurance based on the GDP example alone.

2. Source-reviewed module map

Source path in GIC v2.0.0 Observed responsibility Verification scope
python/global_impact_analysis.py create_comparison_set, add_comparison_member, run_comparison_set, compare_to_benchmark Source-inspected; installed behavior pending
python/global_impact_measurement.py Time-indexed observations, aggregate dimensions, units, revisions, and denominators Source-inspected; installed behavior pending
docs/comparison-governance.md Period/geography/population matching and exclusion policies Documented intent, not end-to-end deployment acceptance
docs/unit-governance.md Canonical unit dimensions, conversions, and incompatibility handling Does not supply an automatic PPP methodology
docs/indicator-registry.md Immutable indicator/method definitions and version bindings Definitions must be confirmed per indicator
docs/public-api.md Public vs. permissioned workspace boundary and API scopes Source description, not a discovered route
tests/test_analysis_scenarios.py Existing analytical regression tests Run against a matching checkout before release

Source identity: The versioned GitHub commit is the reference. Code search on another branch or a WordPress demonstration can behave differently. The platform source and any live WordPress deployment must be compared before enabling actual user workflows.

3. Evidence source and data vintage

The companion CSV contains eight observations: United States (USA) and Germany (DEU), years 2023 and 2024, and two World Bank World Development Indicators (WDI) shown by UNdata: NY.GDP.MKTP.PP.CD (GDP, PPP, current international dollars) and NY.GDP.PCAP.PP.CD (GDP per capita, PPP, current international dollars per person). The file transcribes the UNdata WDI snapshot last updated February 25, 2026. It is neither an original institutional binary extract nor evidence that the upstream WDI values will never be revised.

2024 WDI indicator United States Germany
Total GDP, PPP, current international dollars 29.185 trillion 6.143 trillion
GDP per capita, PPP, current international dollars/person 85,810 73,552
Derived U.S./Germany ratio 4.75× (total) 1.17× (per person)

The last row deliberately contrasts different denominators; it is not an additional WDI indicator. Preserve the full-precision source values in calculations, then round only for display. The ratio differs sharply because country economic scale and output per person answer different questions. These are descriptive national-accounting values, not a direct indicator of ecological impact, equity, welfare, or causality.

4. Indicator identifiers and population semantics

Persist the full WDI series code, not only a label such as “GDP.” NY.GDP.MKTP.PP.CD means a country-level current-price PPP aggregate. NY.GDP.PCAP.PP.CD is derived using a population denominator; its unit and meaning differ materially from an aggregate even though both are PPP-denominated. Do not combine total and per-capita values in one comparison set, use a per-person series as an ordinary currency conversion, or compute a new per-person value from an unrelated population year.

Recommended research metadata for each record include ISO 3166-1 alpha-3 country code, indicator code, year, source vintage, numerator and denominator definition, GDP price basis, PPP base/convention, unit, measurement method, and responsible source URL. The identity tuple (country_code, year, indicator_code, source_vintage) should be unique within the imported source layer. GIC does not, in the reviewed member-construction code, enforce every one of these research-specific constraints; they belong in an explicit preflight.

5. Purchasing-power and currency normalization

Purchasing-power-parity conversion adjusts for cross-country price levels using statistical price comparisons. The selected source indicators are already expressed in current international dollars. Applying a second PPP adjustment, interpreting them as market-exchange-rate U.S. dollars, or comparing them with constant-2021-international-dollar series without transformation is incorrect. A registered GIC unit conversion can scale compatible engineering units, but it cannot prove that two monetary series follow compatible statistical definitions.

The GIC v1.4.0 unit registry seeds common dimensions including USD; the reviewed documentation does not establish an out-of-the-box unit encoding for every international-dollar price basis or a native WDI PPP transformer. A custom unit or indicator definition must therefore state the international-dollar basis and economic meaning. No conversion factor should be guessed or hardcoded without a documented authoritative source and revision. For trends over time, current-price PPP series are unsuitable as stand-alone real-growth evidence; select a compatible constant-price series for that question.

6. Arithmetic contract and numerical precision

For a matching country-pair, year, and indicator, define the comparison ratio as the U.S. value divided by the German value, and a signed difference as the U.S. value minus the German value. Preserve source decimals through the calculation. A ratio of aggregate GDP compares economic size, while a ratio of GDP per capita compares output per resident. When percentages are useful, express the reference country and denominator explicitly; never report “X% larger” without naming the baseline.

ratio(country_A / country_B) = value_A / value_B
signed_difference(A - B)      = value_A - value_B
relative_difference_%         = 100 * (value_A - value_B) / value_B

Reject a zero, missing, negative where inapplicable, nonfinite, or unit-incompatible denominator. If input values have published rounding, report derived precision appropriately. A numerically correct ratio still needs scientific interpretation and source coverage checks.

7. Reproducible input contract (research-side fixture)

The following is illustrative analyst metadata, not a documented GIC REST payload. Each original CSV row is preserved with a stable key and can be transformed into governed observation or comparison-member records only after permission checks, registry binding, and source registration.

{
  "country_code": "DEU",
  "year": 2024,
  "indicator_code": "NY.GDP.PCAP.PP.CD",
  "value": 73551.9347696836,
  "unit": "current international dollars per person",
  "source_system": "World Bank WDI via UNdata",
  "source_snapshot": "2026-02-25",
  "state": "source-transcribed; not independently certified"
}

A proposed ingestion adapter should validate the indicator and unit together, retain original precision and dataset hash, bind a source-version ID and methodology version, and reject conflicting identifiers. Keep the raw capture immutable; store later corrections as new versions with a lineage edge instead of silently replacing the old evidence.

8. GIC comparison-set policy contract

The reviewed method create_comparison_set persists a declared policy with period_policy, geography_policy, population_policy, missing_policy, partial_policy, and direction. Supported period policies include exact, overlap, same_label, and ignore; geography/population controls include exact, warn, and ignore. An example methodology choice for an intentionally cross-country descriptive comparison is:

{
  "period_policy": "same_label",
  "geography_policy": "warn",
  "population_policy": "warn",
  "missing_policy": "exclude",
  "partial_policy": "exclude",
  "direction": "neutral"
}

These values reflect supported enum names in the source. They are not automatically sufficient for scientific validity. Cross-country records have different geography strings by design; geography_policy: exact can exclude the comparator. warn retains the difference but requires the reviewer to acknowledge it. ignore suppresses an important context warning and should not be used merely to obtain a clean-looking result. Confirm the exact deployed implementation before relying on any default.

9. Member registration and provenance

add_comparison_member accepts a member label and at least one of initiative_id, benchmark_id, or value_override; it also accommodates geography, population, period label, and unit. This flexibility is useful for comparison fixtures but introduces risks: a manually overridden number can look as authoritative as a registry-linked observation unless source identity and transformation evidence travel with it. The reviewed code does not automatically require an external-source DOI, WDI indicator code, or UNdata snapshot for every override.

For authoritative workflows, record a source/version reference and indicator-definition ID in the surrounding dataset/analysis evidence, plus a transformation record linking each comparison member to its precise original row. Build the same comparison twice from the pinned inputs and verify stable values and a complete lineage path. If that relationship is not observable at output level, do not mark data-to-chart provenance complete.

10. Effective records, revisions, and missing data

GIC program measurement maintains complete, missing, late, revised, and partial observation states. Revisions point to earlier observation IDs, and analysis normally selects effective records. A source correction should therefore create an identifiable new observation or version rather than rewrite a prior export without trace. Before comparing, reconcile the latest effective observation with the immutable captured WDI snapshot.

Never replace a missing country value with zero. If a country-year-indicator combination is missing, the comparison must show a missing/excluded member and withhold the intended two-country conclusion. If a source revision changes one country only, either compare a coherent revised vintage for both or disclose why combining vintages remains appropriate; the offline example deliberately disallows mixed vintages.

11. Country, period, and context matching caveat

The source implementation of run_comparison_set normalizes compatible units and checks declared geography/population context. However, the reviewed comparison path does not visibly enforce full same-year equivalence across every manually provided value_override, even when the saved policy says same_label. It also permits empty context strings to escape some mismatch checks. Enforce explicit country-year-indicator-vintage matching in a separate research preflight before accepting an output.

Do not infer that the phrase integrity.valid in a result proves all statistical prerequisites. It describes the implemented structural conditions for that result, not a complete scientific protocol. Record a separate scientific_eligible decision with reasons and the exact protocol version.

12. Minimum-member and ranking safeguard

At the reviewed commit, run_comparison_set sets integrity.valid when at least one normalized member remains. This is a legitimate low-level integrity signal but insufficient for a claimed cross-country comparison. The application or review layer must separately require two distinct, eligible countries for the same indicator and year. If one member was excluded, show the exclusion and withhold the ratio, rank, and comparative conclusion.

Similarly, the method can assign numeric ranks even with the default direction: neutral. A rank must not be described as “best performing,” “highest impact,” or “most sustainable” without a defensible directional indicator and approved interpretation policy. For the WDI example, total GDP and per-capita GDP have distinct meanings; neither alone establishes sustainability leadership.

13. Authorization, tenancy, and data minimization

Every read, transform, comparison save, export, or publication action must enforce authenticated identity and workspace/initiative membership at the server boundary, not merely in interface controls. The reviewed GIC API documentation describes permissioned scopes such as workspace:read, reports:read, and exports:read, but it does not prove that a particular live comparison route exists. Treat route names, scopes, roles, and tenant IDs as deployment-confirmation items.

The WDI example contains public aggregates and no person-level observations; nevertheless, production datasets may embed confidential program beneficiaries or unpublished research. Suppress direct identifiers, small-cell disclosures, private evidence excerpts, API keys, and restricted reviewer information from public views and downloadable outputs. Consent and licensing requirements vary with the underlying source; do not assert that public-source metadata grants unlimited redistribution permission.

14. Integrity, source version, and audit trail

The GIC evidence repository supports sources, source versions, checksums, datasets, provenance edges, and claim-evidence relationships. The developer record should link source_id and source-version ID to the original WDI series and the captured file hash; link observations or overrides to transformations; and link result rows and chart marks to the method revision. An archived source hash proves byte identity of a particular artifact only—it does not validate statistical methodology or institutional authorship.

Capture actor, workspace, initiative, revision, creation time, input hash, selected comparison policy, excluded members, warning acknowledgments, and reviewer. Technical audit records may help reconstruct an operation, but do not assume they are appropriate to expose publicly. Preserve previous versions when correcting erroneous results; use explicit invalidation/withdrawal and replacement rather than erasing history.

15. Proposed result envelope (not a native response schema)

A research-grade comparison output should state both computed figures and the prerequisites for interpreting them. This example represents a proposed quality envelope, not an actual GIC API response:

{
  "comparison_type": "descriptive_cross_country",
  "indicator_code": "NY.GDP.PCAP.PP.CD",
  "year": 2024,
  "countries": ["USA", "DEU"],
  "data_vintage": "2026-02-25",
  "unit": "current international dollars per person",
  "ratio_usa_over_deu": 1.16666,
  "member_count": 2,
  "scientific_eligible": "pending_independent_review",
  "publication_authorized": false,
  "limitations": ["Not causal", "Not a sustainability indicator"]
}

A production contract should not expose a hardcoded ratio or eligibility status. Generate values from pinned records, track exclusions, and ensure a reviewer can reproduce the calculation and understand exactly which interpretation is permitted.

16. Source-level code review findings and engineering gaps

The reviewed source establishes concrete functions, data states, comparable-unit logic, and a governed repository design. It does not establish an automatically implemented PPP conversion engine, a fully certified scientific comparison workflow, a confirmed cross-country web control, or a completed deployed-route authorization review. Three acceptance gaps warrant explicit tracking: (a) one-member structural validity, (b) incomplete period/context enforcement for some override paths, and (c) neutral-direction ranking without a scientifically justified “better” definition.

Treat these as source-review observations requiring acceptance tests, not as established incidents on production. Record them with file/line references and synthetic reproduction cases before creating a release-blocking issue; do not silently introduce an undocumented workaround into a live deployment.

17. Worked numerical reproduction

For 2024, divide 29,184,890,000,000.1 by 6,142,807,000,522.214 to obtain a total PPP GDP ratio of approximately 4.751. Divide 85,809.90038463591 by 73,551.9347696836 for a per-capita ratio of approximately 1.167. Both results are calculated from the pinned WDI/UNdata transcription. Comparison of the ratios does not itself establish differences in poverty, access to services, carbon intensity, political institutions, or causally attributable outcomes.

For an additional check, compare the 2023 ratios using the other four records. That second year is a replication and temporal-context exercise, not an inflation-adjusted growth-rate calculation. Avoid displaying 2023–2024 changes in current-international-dollar PPP as “real economic growth.”

18. Local reproducibility commands

Run the companion offline validator against the supplied eight-row CSV. It does not access the network, modify the GIC database, call WordPress, or approve publication.

python3 validate_cross_country.py world_bank_undata_ppp_2023_2024.csv
python3 -m unittest -q test_cross_country_validation.py test_developer_preflight.py
python3 developer_preflight.py world_bank_undata_ppp_2023_2024.csv

Expected outcomes are a valid local source transcription, deterministic ratios, and an explicit OFFLINE_ONLY or PENDING_REVIEW status. A synthetic missing country, mixed vintage, incompatible unit, or changed value must fail the strict preflight. Test a matching GIC checkout separately using its original tests, a dedicated database, and permissioned staging identities.

19. Security and negative-test requirements

Explicitly test unauthorized workspace access, foreign-tenant object IDs, deleted/revoked credentials, public API reads, stale revisions, duplicate comparison members, injected unit codes, nonfinite values, empty geography strings, mixed years, different source vintages, malicious source metadata, and automatic publication-state changes. A UI restriction alone is not acceptance. Require server-side denial and absence of leaked data in response bodies, cached exports, public search, logs, and error traces.

When possible, run an authorized and unauthorized synthetic actor through the same route and verify that only authorized readers can retrieve private comparison inputs. For publication, a saved draft or a numerical integrity.valid result must not bypass independent approval and exact-snapshot publication gates.

20. Scientific review and uncertainty

WDI values are statistically produced macroeconomic measurements, often subject to revisions, statistical definitions, and national-accounts methods. Treat data completeness, PPP methodology, population estimates, outliers, and revisions as material limitations. Do not invent confidence intervals from the eight records: observational uncertainty should come from suitable source metadata or a defensible model, not an arbitrary percentage. A two-country, two-year example does not support broad inference about all countries or a causal policy effect.

A reviewer should independently reproduce each ratio, inspect both WDI series definitions, confirm that the two countries and periods are aligned, inspect material source revisions, and assess whether the claim is descriptive, comparative, or causal. If it is causal, require a separate identification strategy and evidence that the comparison itself cannot provide.

21. Visualization, exports, and data-to-mark lineage

Charts should label “GDP, PPP, current international dollars” separately from “GDP per capita, PPP, current international dollars per person,” use an explicit year and source vintage, show both countries, and disclose exclusions. The axis should not imply identical units across total and per-capita views; use separate views or clear facets. Underlying mark metadata should resolve to source row and method version. If the deployed graph renderer cannot expose that lineage, mark the chart as a preview and link to a controlled evidence table.

Exports should preserve data, methods, caveats, visual encodings, and review status; they should not automatically release private supporting evidence. An export hash protects artifact identity but cannot transform a descriptive economic indicator into proof of impact or justify bypassing editorial publication controls.

Troubleshooting

Symptom Plausible cause Safe diagnostic and recovery
Comparison runs with one country Other member missing, excluded or incompatible Inspect members, excluded, policy and unit; withhold comparative claims until two eligible countries remain
Country totals and per-capita values appear in one ranking Mixed indicator codes or mislabeled units Split into governed indicators; rebuild from original source rows
Ratio changes across reruns Different source vintage, changed revision or overwritten override Pin the UNdata snapshot, compare hashes and selected effective records
Geographic comparison excluded geography_policy: exact rejects different country strings Confirm comparison purpose, adopt reviewed warning policy and retain disclosure rather than quietly ignoring differences
Different years silently combined Period label absent or override path not fully guarded Preflight exact year equality and source vintage; reject mismatches
Apparent “higher is better” ranking Neutral-direction ranks interpreted normatively Remove evaluative language; require a substantively justified indicator direction
PPP results fail unit conversion Unregistered or incompatible international-dollar basis Register a governed custom unit/method; do not coerce values into ordinary USD
Private evidence appears in export Missing server-side object scope or release filtering Disable distribution, preserve evidence, investigate access controls, rotate compromised credentials if needed

Contain the release path before fixing data or permissions. Preserve the failed fixture and audit history, prepare a minimal synthetic reproduction, correct through versioned records, rerun negative tests, and obtain independent approval before restoring public access.

Verification

Apply the following independent gates. Data: exactly eight expected transcribed records, unique country-year-indicator keys, same 2026-02-25 source vintage, correct unit definitions, and values reconciled with the captured source. Analysis: both countries present in each reported comparison; identical year and indicator; no incompatible unit; exclusions and warnings fully recorded; ratios recomputed independently. Scientific: sources, denominators, uncertainty and noncausal interpretation are disclosed. Security: cross-tenant access and public leakage tests pass. Publication: exact subject snapshot and required approval/quality gates pass. Operational: staging execution on a verified installed GIC release is documented.

Offline test results may establish only the first, selected analysis preflight, and article-format checks. They do not establish a deployed API, UI, tenant isolation, independent scientific certification, source redistribution authorization, or the right to publish. Keep the Knowledge Base status Published — verification pending until those checks are independently satisfied.

22. Acceptance matrix and evidence handoff

Each staging test must record case ID, scope, setup, expected result, actual result, environment and installed release, fixture hash, actor role, evidence location, reviewer, and PASS/FAIL/NOT_RUN. The companion staging_acceptance_matrix.csv intentionally labels deployment-dependent tests NOT_RUN. An incomplete test packet is not a production GO decision. Failed scientific or security gates block a claim even if mathematical ratios and ZIP checksums are correct.

The evidence handoff should include the original WDI/UNdata source locator, captured CSV and SHA-256, methodology and calculation version, GIC repository commit, comparison policy and saved inputs, member/exclusion listing, reproduced outputs, reviewer exceptions, a privacy classification, and the proposed publication decision with a human approver.

23. Technical references and limitations

  1. World Bank, World Development Indicators, series NY.GDP.MKTP.PP.CD and NY.GDP.PCAP.PP.CD, displayed by UNdata (snapshot updated 2026-02-25).
  2. World Bank, International Comparison Program methodology and PPP conversion-factor definition.
  3. Sustainable Catalyst, GIC v2.0.0 release note, source commit e75808a0aa272656b1fdbacd2491c30fd6b987dc.
  4. Sustainable Catalyst, python/global_impact_analysis.py, especially comparison-set registration and execution.
  5. Sustainable Catalyst, docs/comparison-governance.md, docs/unit-governance.md, and docs/indicator-registry.md.
  6. Sustainable Catalyst, docs/public-api.md and docs/publication-controls.md.

Verification boundary: This article is based on repository source review, an independently reproducible but locally transcribed official-data example, and synthetic offline checks. It is not a statement that any particular production UI, API route, permissions configuration, database migration, or scientific-review workflow has been tested live. The content may be published as qualified technical guidance while its installed-product verification remains pending.

Related product intelligence

Releases and known issues

Related releases

  • 2.0.0
Scroll to Top