A z-scored ranking of 226 exporting economies (2024) by the diversity and exclusivity of their export basket, and a companion complexity score for 6,266 HS6 product codes.
Surface: /rankings/eci
BACI 202601 (CEPII), HS96, 1996-2024 (retrieved 2026-06-01)
Build the binary country-product matrix M from Balassa RCA on export values: M[c][p] = 1 when RCA >= 1.0, else 0. The threshold is inclusive. BACI export values are thousands of USD, and the units cancel in RCA.
ECI is the second eigenvector of the country-country projection Dc^-1 M Dp^-1 M^T, where Dc = diag(k_c) is diversity (row sums of M) and Dp = diag(k_p) is ubiquity (column sums). PCI is the second eigenvector of the product-product projection of the same M. The hidalgo crate (external) solves bundle_from_rca(mat, threshold=1.0) with defaults max_iters=100000 and tol=1e-12.
This is the eigenvector construction of the Atlas of Economic Complexity (Hausmann et al. 2011), equivalent to the converged method of reflections of Hidalgo and Hausmann (2009) per Mealy, Farmer and Teytelboym (2019). No reflections iteration exists in this repository.
Standardisation is per year, over that year's kept set, with population standard deviation (ddof = 0). Sign is pinned by convention: ECI is negated if it correlates negatively with diversity, PCI if it correlates positively with ubiquity. These conventions are implemented in the hidalgo crate (external).
Countries with zero RCA products and products no country specialises in are dropped that year (k_c > 0, k_p > 0). This is the only filter: there is no minimum population, GDP or trade filter, unlike the Harvard Atlas.
Values are rounded to 4 decimals. Ranks are dense 1..N descending with ties broken by code ascending, so no rank is tied.
PCI is a hybrid. Core HS96 codes carry the eigenvector value. Extended codes (HS02/07/12/17/22 codes absent from the HS96 catalogue) instead get the unweighted mean ECI of the countries with extended RCA >= 1 in that product, and the rank column is recomputed over the union. In 2024 that is 4,762 eigenvector codes and 1,504 mean-ECI codes in one 6,266-row ranking. Extended rows exist only for 2002 onward.
RCA(c,p) = [ x(c,p) / sum_p x(c,p) ] / [ sum_c x(c,p) / sum_cp x(c,p) ]M(c,p) = 1 if RCA(c,p) >= 1, else 0k_c = sum_p M(c,p) (diversity), k_p = sum_c M(c,p) (ubiquity)ECI = z(second eigenvector of diag(1/k_c) M diag(1/k_p) M^T)PCI_core = z(second eigenvector of diag(1/k_p) M^T diag(1/k_c) M)PCI_ext(p) = mean of ECI(c) over { c : RCA_ext(c,p) >= 1 }z(v) = (v - mean(v)) / sd_population(v), per year| Path | Method | Returns | Example |
|---|---|---|---|
| /api/rankings/eci | GET | ECI, rank, name and ISO3 for every reporter in one year, ordered by rank. | /api/rankings/eci?year=2024 |
| /api/rankings/pci | GET | Top PCI products for one year above a minimum world-trade floor (min_trade, default 10,000,000 thousand USD). | /api/rankings/pci?year=2024 |
| /api/v1/rankings/[metric] | GET | The versioned ranking envelope { data, meta }; metric is one of exports, imports, balance, eci, pci. | /api/v1/rankings/eci?year=2024&limit=25 |