Loading workbench page
Fetching primary parquet sources and computing exhibits.
Fetching primary parquet sources and computing exhibits.
What does thirty years of bilateral trade data tell us about world trade in footwear? Who makes it, who buys it, which HS6 lines dominate, and how complex is it on average? HS Section 12is one of 21 top-level groupings in the Harmonized Commodity Description and Coding System maintained by the World Customs Organization (WCO, Harmonized System Nomenclature, 2022 edition; HS96 applied here for back-compatibility with the full BACI window).
SELECT year, SUM(export_value) * 1000 AS world_usd FROM 'data/parquet/country_year_product/**/*.parquet' cyp JOIN products p ON p.code = cyp.product_code WHERE CAST(p.section AS INTEGER) = 12 GROUP BY year ORDER BY year;
Exporter concentration reflects where productive capacity sits in this section. Comparing the exporter table with the importer table reads as a dependency map: where the gap is large, the section is geographically separated between producers and consumers.
HS Sections are coarse. Within this section, the 10 largest HS6 lines reveal what is actually being traded, whether the growth comes from a few dominant lines or a broad basket.
The Product Complexity Index (PCI) of Hausmann & Hidalgo (2009) scores each HS6 by the productive knowledge its exporters collectively hold. Averaging PCI within an HS section gives a rough read on how sophisticated that corner of the trade system is. PCI is zero-centered; positive sections sit above the world average.
Balassa's (1965) Revealed Comparative Advantage answers the complementary question to 'who is biggest': who is disproportionately specialised in this section relative to its own total export basket and the world's. Section-level RCA = (Xc,sec / Xc,total) / (XW,sec / XW,total). Values above 1 mean the country exports a larger share of its basket in this section than the world does; above 2 is the conventional 'strongly specialised' threshold. The sample is restricted to economies with at least US$1B of total exports in 2024 so micro-states with 100% single-section baskets don't dominate the top.
Whether productive capacity in footwear is concentrating into fewer national hands or spreading across more is the section-level analogue of the DOJ/FTC industry-concentration question (DOJ/FTC Merger Guidelines, 2010). The Herfindahl-Hirschman index of exporter shares within HS Section 12, computed annually, summarises that trajectory in a single line. On the 0-10,000 scale, HHI > 2,500 is the conventional 'highly concentrated' threshold and HHI from 1,500 through 2,500 is 'moderately concentrated'; 10,000/HHI is the effective number of equally-sized national suppliers. A rising HHI is consolidation; a falling HHI is the entry of new national producers (China in textiles, machinery, and electronics through the 2000s).
The 1,500/2,500 bands here follow the historical 2010 DOJ/FTC guidelines, withdrawn in 2023. The 2023 guidelines use a highly concentrated threshold above 1,800. These figures measure concentration across exporting countries, not firms in a defined market; the bands are descriptive benchmarks, not antitrust findings.
Sectoral league-table positions move, sometimes quietly over decades, sometimes sharply around a single policy episode (China's WTO accession in 2001, the ATC phase-out in 2005, the US-China tariff war of 2018-20). Ranking each exporter in footwearin 2000 and in 2024and taking the difference surfaces the countries that have climbed or fallen the furthest in global competitive position. Δ > 0 = climbed the league (improved rank), Δ < 0 = fell.
SELECT c.iso3, SUM(cyp.export_value)*1000 AS value_usd FROM 'data/parquet/country_year_product/year=2024/*.parquet' cyp JOIN products p ON p.code = cyp.product_code JOIN 'data/parquet/countries.parquet' c ON c.code = cyp.country_code WHERE CAST(p.section AS INTEGER) = 12 GROUP BY c.iso3 ORDER BY value_usd DESC LIMIT 15;
SELECT cyp.product_code, p.name, SUM(cyp.export_value)*1000 AS value_usd FROM 'data/parquet/country_year_product/year=2024/*.parquet' cyp JOIN products p ON p.code = cyp.product_code WHERE CAST(p.section AS INTEGER) = 12 GROUP BY cyp.product_code, p.name ORDER BY value_usd DESC LIMIT 10;
SELECT p.section, AVG(pci.pci) AS mean_pci FROM products p JOIN 'data/parquet/pci_rankings.parquet' pci ON pci.product_code = p.code AND pci.year = 2024 GROUP BY p.section ORDER BY mean_pci DESC;
WITH sec_val AS (
SELECT country_code, SUM(export_value) AS v
FROM 'data/parquet/country_year_product/year=2024/*.parquet' cyp
JOIN products p ON p.code = cyp.product_code
WHERE CAST(p.section AS INTEGER) = 12
GROUP BY country_code
), tot_val AS (
SELECT country_code, SUM(export_value) AS v
FROM 'data/parquet/country_year_product/year=2024/*.parquet'
GROUP BY country_code
)
SELECT country_code,
(sec_val.v / tot_val.v) / ((SELECT SUM(v) FROM sec_val) / (SELECT SUM(v) FROM tot_val)) AS rca
FROM sec_val JOIN tot_val USING(country_code)
WHERE tot_val.v * 1000 >= 1e9 ORDER BY rca DESC LIMIT 15;WITH agg AS ( SELECT year, country_code, SUM(export_value) AS v FROM 'data/parquet/country_year_product/**/*.parquet' cyp JOIN products p ON p.code = cyp.product_code WHERE CAST(p.section AS INTEGER) = 12 AND export_value > 0 GROUP BY year, country_code ), s AS ( SELECT year, v / SUM(v) OVER (PARTITION BY year) AS share FROM agg ) SELECT year, SUM(share*share) AS hhi FROM s GROUP BY year ORDER BY year;
WITH agg AS (
SELECT year, country_code, SUM(export_value) AS v
FROM 'data/parquet/country_year_product/**/*.parquet' cyp
JOIN products p ON p.code = cyp.product_code
WHERE CAST(p.section AS INTEGER) = 12 AND year IN (2000, 2024)
GROUP BY year, country_code
), ranked AS (
SELECT year, country_code,
ROW_NUMBER() OVER (PARTITION BY year ORDER BY v DESC) AS rnk
FROM agg
)
SELECT country_code,
MAX(CASE WHEN year=2000 THEN rnk END) AS rank_2000,
MAX(CASE WHEN year=2024 THEN rnk END) AS rank_2024
FROM ranked GROUP BY country_code ORDER BY rank_2000 - rank_2024 DESC;