Fetching primary parquet sources and computing exhibits.
supply chain intelligence
If HS 854231 needs to come from a friendlier origin, where could it come from?
Given an importer (USA) and an HS6 product (Electronic integrated circuits: processors and controllers, whether or not combined with memories, converters, logic circuits, amplifiers, clock and timing circuits, or other circuits), the page ranks alternative suppliers on a composite friendshoring score that rewards capability and penalises cost, using a continuous, year-varying UNGA alignment term and an explicit median-alignment filter for the shortlist. World trade of this line in 2024 totalled $427.7B. Suppliers below USA's full-panel median alignment represented roughly 39.8% of that total.
HS6854231
revisionHS07
importerUSA
year2024
vote year2024
world trade$427.7B
below-median alignment share39.8%
How the friendshoring score is built
The composite score decomposes a supplier into capability, political alignment, and landed cost, in the spirit of Grossman, Helpman & Sabal (2024, 'Resilience in Vertical Supply Chains') on sourcing under geopolitical risk, and of Goldberg & Reed (2023, Brookings Papers on Economic Activity) on the empirical geography of friendshoring. The 'China shock' evidence of Autor, Dorn & Hanson (2013, American Economic Review103(6)) motivates treating single-origin concentration as a first-order risk, not a residual. Farrell & Newman (2019, 'Weaponized Interdependence,' International Security44(1)) frames why the ally factor enters multiplicatively rather than as a soft penalty. Aiyar, Chen, Ebeke, Garcia-Saltos, Gudmundsson, Ilyina, Kangur, Kunaratskul, Rodríguez, Ruta, Schulze, Soderberg & Trevino (2023, 'Geoeconomic Fragmentation and the Future of Multilateralism,' IMF Staff Discussion Note SDN/2023/001) estimate that fragmentation into geopolitical blocs could cost the world economy between 0.2 and 7 per-cent of GDP, with low-income and small-open economies bearing the largest share, the macro ceiling for what this page prices at the HS6 level. Alfaro & Chor (2023, 'Global Supply Chains: The Looming 'Great Reallocation',' NBER WP 31661) show that US import reshuffling from China to Vietnam, Mexico and India is already tracking this bloc logic in the bilateral data, the direction the Scanner is built to help visualise.
Capability and cost inputs are normalised across the current supplier universe for this HS6. The ally_index is separately normalised to [0, 1] with the full UNGA panel's vote-year span, so the combined score is unit-free and rank-interpretable within this request. BACI values are stored in thousands of USD and multiplied by 1,000 for display (CEPII BACI 202601 (retrieved 2026-06-01) convention). RCA is the Balassa (1965) index from the rca_matrix parquet.
Honest caveat on the ally factor.This page uses the Bailey, Strezhnev & Voeten (2017, Journal of Conflict Resolution 61(2): 430-456) UN General Assembly ideal-point panel. ally_dist(i, j, t) = |theta_i(t) - theta_j(t)|, the BSV absolute ideal-point distance. ally_index(i, j, t) = 1 - ally_dist / (max_c theta_c(t) - min_c theta_c(t)), in [0, 1]. 1 means an identical UNGA position, 0 means as far apart as that year's two extremes. Normalising by the year's own span, not by a constant, keeps it comparable across years as the assembly spreads or converges. is_ally(i, j, t) = 1 when ally_dist is below the median distance from the importer to every country with an ideal point that year. The median split is the page's own established convention: Figure 4c already median-splits diplo_disagreement. It is computed over the full UNGA panel, not the HS6 supplier universe, so the cut does not move with the product. The vote year is max(year) at or below the BACI year, here 2024, and observations are never carried forward beyond the panel.
ally_index is affine in ally_dist within an importer-year, so it never reorders suppliers for a given importer. Its attainable range depends on where the importer sits: an importer at an extreme can reach 0, while one near the centre bottoms out near 0.5. Score levels are therefore not comparable across importers. The median split makes roughly half of all observed UNGA members "allies" of any importer-year by construction. It is a relative-alignment cut, not a hostility, embargo, or policy-risk classification. UNGA ideal-point distance is a proxy for revealed foreign-policy alignment and not a measure of alliance, export-control regime or sanctions exposure. Non-members may be unobserved: TWN stops in 1971, while HKG and MAC never appear. Such suppliers receive no score and are disclosed rather than filled. Figures 4b to 4e remain on the 2020 diplo_disagreement snapshot stored in Legacy gravity_bilateral table (exact release provenance unverified) and are not recomputed from this panel.
Who are the above-median-aligned alternatives, ranked?
The top-20 non-dominant suppliers of HS 854231 in 2024, ranked by the composite score above. The shortlist is explicitly filtered to is_ally = 1, the importer-year's below-median ideal-point distance, and ranked with the continuous ally_index term.
Excluded for missing 2024 ideal points: HKG, S19, together representing 24.16% of current HS6 world supply.
Figure 1
Friendshoring score, top-20 alternative suppliers to USA, HS 854231, 2024
Scroll horizontally to view the full chart.
Are the cheap suppliers also capable, and closely aligned?
A cost-quality frontier for HS 854231 in 2024: unit value (BACI value over quantity, USD per metric ton) against world export share. Bubble size scales with great-circle distance to USA (Legacy gravity_bilateral table (exact release provenance unverified)). Bubble colour encodes the full-panel median alignment split for vote year 2024: green is above-median alignment, amber is below-median alignment, and grey has no usable ideal point. The ideal friendshoring candidate sits in the upper-left quadrant with a small bubble and green marker.
Figure 2
Cost-quality frontier: unit value vs. world share, HS 854231, 2024
Scroll horizontally to view the full chart.
How much dollar value could shift to more closely aligned origins?
A first-order dollarisation of the shift opportunity. The first bar multiplies USA's total HS 854231 imports in 2024 by the world-export share of below-median-aligned origins, a BACI-mirror approximation because partner-level HS6 bilateral flows are not loaded on this page. The second bar is the total HS 854231 export value of above-median-aligned suppliers excluding the dominant origin, an upper bound on supply that could be redirected toward USA without new capacity.
Figure 3
Shift opportunity, USA HS 854231 below-median-alignment imports vs. aligned spare capacity, 2024
Scroll horizontally to view the full chart.
Approximate imports allocated to below-median-aligned origins: $10.7B. Above-median-aligned alternative HS6 export capacity (upper bound, excludes the dominant supplier): $150.1B. The first amount is an alignment split, not a policy-risk estimate. The ratio only compares the approximate current amount with gross alternative export capacity.
Sources: CEPII BACI 202601 (retrieved 2026-06-01) for import totals and alternative export capacity; Bailey, Strezhnev and Voeten United Nations General Assembly Ideal Points, doi:10.7910/DVN/LEJUQZ, Harvard Dataverse v39.0, vote year 2024. The first bar uses the importer's total HS6 imports times below-median-aligned suppliers' world-export share (approximation, exact BACI-mirror would need bilateral HS6 flows). Authors calcs.
By HS Section: dominant supplier vs. #1 above-median-aligned alternative
Rolled up across all HS6 lines in each of the 16 HS Sections present in the HS07 product catalogue, 2024. For each Section the table lists the largest exporter, whether its ideal-point distance is above or below USA's full-panel median, and the highest-share alternative on the above-median-aligned side. An unavailable cell means the supplier lacks a 2024ideal point or the alignment layer could not be read.
Figure 4
By-sector summary, dominant supplier and #1 above-median-aligned alternative, 2024
§
HS Section
Dominant supplier
Share
Alignment
#1 aligned alt
Alt share
1
Live animals & animal products
NOR Norway
15.1%
above median
CHL Chile
12.2%
2
Vegetable products
NLD Netherlands
37.9%
above median
COL Colombia
14.5%
4
Prepared foodstuffs, beverages, tobacco
CHN China
26.3%
below median
NLD Netherlands
8.0%
5
Mineral products
RUS Russian Federation
23.4%
below median
Figure 4b
UN-vote-alignment bins x USA trade share, 2013-2017 vs. 2018-2023
Figure 4c
Allyshoring vs. nearshoring decomposition, USA trade share change 2013-2017 → 2018-2023
Scroll horizontally to view the full chart.
Each of USA's partners is classified on two axes: geography ('near' = below the median great-circle distance to USA, 'far' = above) and ideology ('ally' = below the median CEPII UN-vote disagreement, 'rival' = above). Summing the change in each partner's trade share across the two periods into the four quadrants separates the two narratives: nearshoringgain (near & rival) = -0.80 pp across 32 partners, allyshoringgain (far & ally) = +0.47 pp across 32 partners, 'both' (near & ally) = +1.25 pp, 'neither' (far & rival) = . A positive 'ally' column paired with a negative 'rival' column is the Alfaro & Chor (2023) signature; a positive 'near' column paired with a negative 'far' column is the Goldberg & Reed (2023, Brookings) nearshoring signature. The two are empirically separable here.
Figure 4d
USA trade share, closest 5 voting allies vs. closest 5 rivals, 2000-2024
Scroll horizontally to view the full chart.
Figure 4e
Supplier-concentration HHI on USA goods imports, 2000-2024
Scroll horizontally to view the full chart.
The Herfindahl-Hirschman Index (HHI) on USA's import partners moved from 0.077 in 2000 (effective number of partners 13) to 0.075 in 2024 (effective number 13). Between 2018 and 2024 the index moved by -0.018 points; a falling HHI is the macro footprint of supplier diversification. Grossman, Helpman & Sabal (2024, NBER WP 31739) frame supply-chain resilience as an explicit function of supplier concentration: a doubling of the effective number of suppliers cuts the variance of input availability by half under their model. The HHI here uses the full partner distribution and is invariant to the choice of 'ally' bins, so it complements Figure 4d (fixed five-allies/five-rivals) by capturing diversification regardless of the identity of the new suppliers. Compare to Goldberg & Reed (2023, BPEA) on US import-concentration over 2017-2022.
Full supplier detail, the shortlist underlying Figure 1
The top-20 above-median-aligned alternatives with every factor that enters the score, broken out so the ranking is auditable: world share, RCA, unit value, tariff into USA, distance, UNGA alignment index, and the capability / cost decomposition. Tariff blanks mean the origin has no WITS-TRAINS filing in the latest year, typically because the line is MFN-zero or the partner is outside the WITS reporter universe. Distance blanks mean the origin is not in CEPII Gravity (small islands, BACI residual groupings).
Figure 5
Friendshoring shortlist detail, top-20 alternatives to USA, HS 854231, 2024
#
Exporter
World share
RCA
Unit value (USD/t)
Tariff into USA
Distance
Ally index
Capability
Cost
Score
1
KOR Korea, Rep.
12.76%
3.81
$4,659,093
n/a
11.1K km
0.702
0.220
0.371
0.416
2
ISR Israel
2.84%
9.50
$6,524,102
n/a
9.1K km
0.989
0.122
0.428
Who uses this view and how
Supply-chain strategy. Figure 1 is the first-pass shortlist for a CPO or procurement head looking to replace a below-median-aligned origin on this HS6 without giving up capability.
CFO scenario planning. Figure 3 compares the approximate import value allocated to below-median-aligned origins with upper-bound redirectable capacity. It is a sourcing scenario, not an estimate of regulatory or financial exposure.
Government affairs. Figure 4 is the sector-level map of where the dominant supplier falls below the importer's median UNGA alignment and where an above-median-aligned alternative exists. That relative map can be read alongside, but does not encode, industrial-policy eligibility.
Policy read
The Scanner is the HS6-level instrument for a policy question that is now explicitly on the table. USTR Section 301 actions (2018, expanded 2024) and the October 2022 + October 2023 + December 2024 BIS export-control rounds on advanced semiconductors are the US side of a bloc-driven reshuffling that Alfaro & Chor (2023) and Aiyar et al. (2023) both document in the data: US imports from China as a share of US imports have fallen roughly 8 percentage points since 2018, with Vietnam, Mexico, and India picking up the slack, precisely the kind of redirection the composite score surfaces. The EU Critical Raw Materials Act (entered into force May 2024) sets a 65% single-country supply cap for strategic raw materials by 2030, which in the friendshoring frame is equivalent to binding the maximum of world_sharein Figure 1, if the dominant origin exceeds the cap, diversification becomes policy-mandated, not optional. The US IRA (2022) and CHIPS Act (2022) do the same for EV batteries and leading-edge logic with explicit 'foreign entity of concern' exclusions on the buyer side. India PLI and the IPEF supply-chain pillar (signed November 2023) are the coordinated-build side of the same architecture. For Bangladesh and other small, trade-dependent economies, the IMF's Aiyar et al. fragmentation estimate of 0.2-7% GDP loss is the downside scenario; Baldwin, Freeman & Theodorakopoulos (2023) make the counter-argument that hyper-specialisation is more resilient than it looks because so many inputs travel through deep-tier supplier networks. Either way, the HS6 view on this page is where the policy question becomes actionable.
References
Aiyar, S., Chen, J., Ebeke, C., Garcia-Saltos, R., Gudmundsson, T., Ilyina, A., Kangur, A., Kunaratskul, T., Rodríguez, S. L., Ruta, M., Schulze, T., Soderberg, G., & Trevino, J. P. (2023). 'Geoeconomic Fragmentation and the Future of Multilateralism. ' IMF Staff Discussion Note SDN/2023/001.
Alfaro, L., & Chor, D. (2023). 'Global Supply Chains: The Looming 'Great Reallocation'.' NBER Working Paper 31661.
Autor, D. H., Dorn, D., & Hanson, G. H. (2013). 'The China Syndrome: Local Labor Market Effects of Import Competition in the United States.' American Economic Review 103(6): 2121-2168.
Bailey, M. A., Strezhnev, A., & Voeten, E. (2017). 'Estimating Dynamic State Preferences from United Nations Voting Data.' Journal of Conflict Resolution 61(2): 430-456. United Nations General Assembly Ideal Points, doi:10.7910/DVN/LEJUQZ, Harvard Dataverse v39.0, CC0 1.0.
Balassa, B. (1965). 'Trade Liberalisation and 'Revealed' Comparative Advantage.' The Manchester School 33(2): 99-123.
Baldwin, R., Freeman, R., & Theodorakopoulos, A. (2023). 'Hidden Exposure: Measuring US Supply Chain Reliance.' Brookings Papers on Economic Activity Fall.
Farrell, H., & Newman, A. L. (2019). 'Weaponized Interdependence: How Global Economic Networks Shape State Coercion.' International Security 44(1): 42-79.
Goldberg, P. K., & Reed, T. (2023). 'Is the Global Economy Deglobalizing? And if So, Why? And What is Next?' Brookings Papers on Economic Activity Spring: 347-396.
Grossman, G. M., Helpman, E., & Sabal, A. (2024). 'Resilience in Vertical Supply Chains.' NBER Working Paper 31739.
Head, K., & Mayer, T. (2014). 'Gravity Equations: Workhorse, Toolkit, and Cookbook.' In Handbook of International Economics, vol. 4, ch. 3.
Hummels, D., & Klenow, P. J. (2005). 'The Variety and Quality of a Nation's Exports.' American Economic Review 95(3): 704-723.
Leeds, B. A., Ritter, J. M., Mitchell, S. M., & Long, A. G. (2002). 'Alliance Treaty Obligations and Provisions, 1815-1944.' International Interactions 28(3): 237-260.
The highest-scoring above-median-aligned alternative is Rep. of Korea (KOR), with RCA of 3.81 and a world export share of 12.76%. The dominant supplier Chinese Taipei is excluded from the ranking so the table reads as a redirection shortlist.
Sources: CEPII BACI 202601 (retrieved 2026-06-01) country_year_product (exports and derived unit values); CEPII rca_matrix (Balassa 1965 RCA); Legacy gravity_bilateral table (exact release provenance unverified) (distance); WITS-TRAINS pref_tariff_hs6 (tariffs); Bailey, Strezhnev and Voeten United Nations General Assembly Ideal Points, doi:10.7910/DVN/LEJUQZ, Harvard Dataverse v39.0, vote year 2024. Authors calcs.Query
-- Top-20 alternatives ranked by composite friendshoring score.
WITH ip AS (
SELECT iso3, ideal_point
FROM read_parquet('data/parquet/un_ideal_points.parquet')
WHERE year = 2024
),
imp AS (SELECT ideal_point AS p FROM ip WHERE iso3 = 'USA'),
d AS (
SELECT ip.iso3, abs(ip.ideal_point - (SELECT p FROM imp)) AS ally_dist FROM ip
),
s AS (SELECT max(ideal_point) - min(ideal_point) AS span FROM ip),
m AS (SELECT median(ally_dist) AS med FROM d WHERE iso3 <> 'USA'),
alignment AS (
SELECT d.iso3,
1.0 - d.ally_dist / NULLIF((SELECT span FROM s), 0) AS ally_index,
CASE WHEN d.ally_dist < (SELECT med FROM m) THEN 1 ELSE 0 END AS is_ally
FROM d
)
SELECT suppliers.iso3, suppliers.rca, suppliers.world_share,
suppliers.uv, suppliers.tariff, suppliers.dist_km, alignment.ally_index
FROM suppliers
JOIN alignment USING (iso3)
WHERE alignment.is_ally = 1 AND suppliers.iso3 != 'S19'
ORDER BY suppliers.capability * alignment.ally_index * (1 / suppliers.cost) DESC
LIMIT 20;
Points in the upper-left quadrant combine high world share with low unit cost, the natural diversification pool for USA. Points in the upper-right are capable but expensive (often reflecting product-mix quality, not pure markup, per Hummels & Klenow 2005 AER 95(3) on quality-adjusted unit values). Amber points remain visible for comparison, but the Figure 1 shortlist excludes them with is_ally = 1. Grey points lack a contemporaneous ideal point and receive no composite score.
Sources: CEPII BACI 202601 (retrieved 2026-06-01) country_year_product (exports and derived unit values); Legacy gravity_bilateral table (exact release provenance unverified) (distance, bubble size); Bailey, Strezhnev and Voeten United Nations General Assembly Ideal Points, doi:10.7910/DVN/LEJUQZ, Harvard Dataverse v39.0, vote year 2024 (colour). Authors calcs.
BRA Brazil
21.0%
6
Chemical products
CHN China
26.4%
below median
USA USA
10.6%
7
Plastics & rubber
USA USA
36.9%
above median
NLD Netherlands
16.1%
8
Raw hides, leather, fur
ESP Spain
35.9%
above median
BRA Brazil
19.9%
9
Wood & articles of wood
CHN China
16.5%
below median
CAN Canada
8.0%
10
Pulp, paper, paperboard
CHN China
48.2%
below median
USA USA
6.3%
11
Textiles & apparel
CHN China
37.6%
below median
TUR Türkiye
6.5%
13
Stone, ceramics, glass
CHN China
35.4%
below median
FRA France
6.5%
15
Base metals
CHN China
22.7%
below median
ITA Italy
9.8%
16
Machinery & electrical equipment
CHN China
28.6%
below median
KOR Rep. of Korea
9.6%
17
Transport equipment
CHN China
18.7%
below median
MEX Mexico
12.3%
18
Optical, measuring, medical instruments
CHN China
15.7%
below median
DEU Germany
15.3%
20
Miscellaneous manufactured
CHN China
65.0%
below median
CZE Czechia
3.8%
12 of 16 HS Sections have a below-median-aligned dominant supplier and an above-median-aligned alternative. This is a relative-alignment view of the current trade map, not a measure of trade restrictions or exposure.
Sources: CEPII BACI 202601 (retrieved 2026-06-01) aggregated to HS Sections via products_all.parquet (WCO HS 2022 Section definitions); Bailey, Strezhnev and Voeten United Nations General Assembly Ideal Points, doi:10.7910/DVN/LEJUQZ, Harvard Dataverse v39.0, vote year 2024. Authors calcs.
Partners are binned into quintiles of CEPII's diplo_disagreement index (ultimately built on Bailey, Strezhnev & Voeten 2017 UN General Assembly ideal-point voting data): bin 1 is USA's closest voting allies, bin 5 is the most distant. Each cell shows USA's share of total goods trade going to that bin, averaged over the two windows. Between the two periods, closest-ally bins shifted by +1.3 pp (q1) and +1.2 pp (q2); most-distant bins shifted by -2.0 pp (q4) and -1.8 pp (q5). A rising allied share paired with a falling distant share is the bloc-reallocation signature Alfaro & Chor (2023) and Aiyar et al. (2023) document in post-2018 US import data.
Sources: diplo_disagreement stored in Legacy gravity_bilateral table (exact release provenance unverified) (2020 snapshot, based on Bailey, Strezhnev & Voeten 2017 ideal-point voting data); CEPII BACI 202601 (retrieved 2026-06-01) bilateral_year for total goods trade 2013-2023. Bins are quintiles of diplo_disagreement computed across all partners of USA. Period windows are 2013-2017 and 2018-2023. Authors calcs.Query
WITH diplo AS (
SELECT iso3_o AS iso3, diplo_disagreement
FROM 'data/parquet/gravity_bilateral/year=2020/*.parquet'
WHERE iso3_d = 'USA' AND diplo_disagreement IS NOT NULL
),
thresholds AS (SELECT percentile_cont(0.20) WITHIN GROUP (ORDER BY diplo_disagreement) AS q20, ...)
SELECT bin_idx, period, SUM(total_value) / NULLIF(SUM(SUM(total_value)) OVER (PARTITION BY period), 0) AS share
FROM tagged GROUP BY bin_idx, period;
-2.56 pp
Sources: CEPII BACI 202601 (retrieved 2026-06-01) bilateral_year 2013-2023 (total goods trade, thousands USD); dist and diplo_disagreement stored in Legacy gravity_bilateral table (exact release provenance unverified) (2020 snapshot, the latter ultimately built on Bailey, Strezhnev & Voeten 2017 J. Conflict Resolution 61(2)). Medians are computed across USA's partner universe in the gravity panel. Pre = 2013-2017, post = 2018-2023.
Query
WITH shares AS (
SELECT partner_iso3,
SUM(CASE WHEN year < 2018 THEN v END) / pre_total AS pre_share,
SUM(CASE WHEN year >= 2018 THEN v END) / post_total AS post_share
FROM bilateral_year_flows_usa GROUP BY partner_iso3
),
med AS (
SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY dist) AS md,
percentile_cont(0.5) WITHIN GROUP (ORDER BY diplo_disagreement) AS mi
FROM gravity_bilateral_2020 WHERE iso3_d = 'USA'
)
SELECT
CASE WHEN dist < md AND diplo_disagreement < mi THEN 'near-ally'
WHEN dist < md THEN 'near-rival'
WHEN diplo_disagreement < mi THEN 'far-ally'
ELSE 'far-rival' END AS quadrant,
SUM(post_share - pre_share) AS delta
FROM shares s JOIN gravity_bilateral_2020 g ON g.iso3_o = s.partner_iso3
CROSS JOIN med GROUP BY quadrant;
The five closest and five most distant partners of USA are fixed by CEPII's diplo_disagreementindex (2020 snapshot, ultimately built on Bailey, Strezhnev & Voeten 2017 UN General Assembly ideal-point voting). Each line is the combined bloc's share of USA's total goods trade, year by year. Between 2000 and 2024 the ally-5 share moved from 9.0% to 6.3% (-2.7 pp), while the rival-5 share moved from 1.3% to 0.4% (-0.9pp). Aiyar, Chen, Ebeke, Garcia-Saltos, Gudmundsson, Ilyina, Kangur, Kunaratskul, Rodríguez, Ruta, Schulze, Soderberg & Trevino (2023, IMF SDN/2023/001) document a comparable bloc-divergence pattern once the sample is partitioned on UN voting; a widening ally-rival gap in the post-2018 window is the visual friendshoring signal.
Sources: diplo_disagreement stored in Legacy gravity_bilateral table (exact release provenance unverified) (2020 snapshot, based on Bailey, Strezhnev & Voeten 2017 J. Conflict Resolution 61(2): 430-456); CEPII BACI 202601 (retrieved 2026-06-01) bilateral_year (thousands USD, multiplied by 1000 for display). Allies and rivals are the 5 countries with the smallest and largest diplo_disagreement to USA, held fixed across all years.
Query
WITH ranked AS (
SELECT iso3_o AS iso3, diplo_disagreement,
ROW_NUMBER() OVER (ORDER BY diplo_disagreement ASC) AS rk_ally,
ROW_NUMBER() OVER (ORDER BY diplo_disagreement DESC) AS rk_rival
FROM 'data/parquet/gravity_bilateral/year=2020/*.parquet'
WHERE iso3_d = 'USA' AND diplo_disagreement IS NOT NULL
)
SELECT year,
CASE WHEN iso3 IN (SELECT iso3 FROM ranked WHERE rk_ally <= 5) THEN 'allies'
WHEN iso3 IN (SELECT iso3 FROM ranked WHERE rk_rival <= 5) THEN 'rivals' END AS bloc,
SUM(total_value) / NULLIF(SUM(SUM(total_value)) OVER (PARTITION BY year), 0) AS share
FROM bilateral_year_flows_usa
GROUP BY year, bloc ORDER BY year, bloc;
Source: CEPII BACI bilateral_year (thousands USD), aggregated by exporter to compute partner shares of USA's total annual goods imports; HHI = sum(share_i^2) over all real-ISO3 exporters. Range [0, 1]; effective-number-of-partners = 1/HHI. Literature: Grossman, Helpman & Sabal (2024) NBER WP 31739 on resilience in vertical supply chains; Goldberg & Reed (2023) Brookings Papers on Economic Activity.
Query
WITH flows AS (
SELECT year, exporter_code, SUM(total_value) AS v
FROM 'data/parquet/bilateral_year/**/*.parquet'
WHERE importer_code = 842 AND total_value > 0
AND year BETWEEN 2000 AND 2024
GROUP BY year, exporter_code
),
tot AS (SELECT year, SUM(v) AS yt FROM flows GROUP BY year)
SELECT f.year, SUM(POWER(f.v / t.yt, 2)) AS hhi,
COUNT(DISTINCT f.exporter_code) AS n_partners
FROM flows f JOIN tot t USING(year)
GROUP BY f.year ORDER BY f.year;
0.283
3
IRL Ireland
2.83%
2.49
$2,288,689
n/a
5.1K km
0.655
0.032
0.088
0.239
4
PHL Philippines
1.80%
4.15
$1,011,422
n/a
13.7K km
0.418
0.034
0.106
0.133
5
JPN Japan
4.26%
1.27
$1,967,700
n/a
10.9K km
0.662
0.025
0.158
0.103
6
CRI Costa Rica
1.15%
9.77
$9,262,343
n/a
3.6K km
0.464
0.051
0.241
0.098
7
MLT Malta
0.30%
9.32
$3,033,228
n/a
7.4K km
0.655
0.013
0.165
0.050
8
USA United States
5.79%
n/a
$319,079
n/a
1.2K km
1.000
0.000
0.004
0.000
9
DEU Germany
1.56%
n/a
$96,801
n/a
n/a
0.749
0.000
0.021
0.000
10
NLD Netherlands
0.79%
n/a
$53,454
n/a
5.9K km
0.726
0.000
0.006
0.000
11
FRA France
0.49%
n/a
$96,441
n/a
5.9K km
0.792
0.000
0.008
0.000
12
MEX Mexico
0.19%
n/a
$97,126
n/a
3.4K km
0.467
0.000
0.005
0.000
13
CZE Czechia
0.13%
n/a
$71,854
n/a
6.6K km
0.790
0.000
0.008
0.000
14
BEL Belgium
0.12%
n/a
$49,070
n/a
5.9K km
0.722
0.000
0.006
0.000
15
CAN Canada
0.10%
n/a
$42,825
n/a
0.6K km
0.746
0.000
0.001
0.000
Sources: CEPII BACI 202601 (retrieved 2026-06-01), CEPII rca_matrix, Legacy gravity_bilateral table (exact release provenance unverified), WITS-TRAINS pref_tariff_hs6; Bailey, Strezhnev and Voeten United Nations General Assembly Ideal Points, doi:10.7910/DVN/LEJUQZ, Harvard Dataverse v39.0, vote year 2024. Authors calcs.