World War II reshaped the global order by increasing international cooperation and open markets. Global trade was unlocked through containerization in the late 1960s. Then, trade increased further in the 1980s and 1990s as deregulation, trade agreements, and technological advances expanded the market.
More recently, COVID-19 exposed vulnerabilities in global supply chains, a situation worsened by subsequent trade wars and geopolitical conflicts. The 2020s have emerged as the decade of logistics and tariffs, marking a pivotal shift in how goods are produced, moved, and protected.
International Trade Data
My favorite source of trade data can be found at oec.world. It includes incredible treemaps of products, sources, and destinations, viewable from many perspectives.

Modeling conflicts using Label Propagation
Label Propagation is a powerful, graph-based algorithm used to reveal community structure within complex networks.
By initially assigning distinct labels (or colors) to a subset of nodes, the algorithm iteratively updates each node’s label based on the most frequent label among its neighbors. This process naturally clusters nodes that are strongly connected, helping us identify groups that may share similar conflict characteristics.
Case study 1: Modeling an Invasion of Taiwan by China
In this case study, we simulate a hypothetical invasion of Taiwan by China using global trade networks as a proxy for economic and geopolitical interdependencies
Step 1: Collecting the data
First, I downloaded data from oec.world and formatted all source to destination trade relationships for every single country. The resulting JSON file was 0.737 MB.

Step 2: Define the seeds
To simulate the geopolitical alignments that might emerge during a hypothetical invasion of Taiwan by China, we begin by defining seed labels that quantify each country’s predisposition toward or against China.
For example, core pro-China states such as China, Russia, and North Korea are assigned a strong positive score (+1.0), while principal anti-China nations like Taiwan, the United States, Japan, and other key Western allies receive a score of -1.0.

Step 3: Calculate Label Propagation
Step 3 is to actually perform the calculation. I’ll spare you the details but the result is very interesting!
Here are the top 30 most aligned countries with China:

Top 50 least aligned with China (longer tail)

Step 4: Plotting it on a map
Here is the same data plotted on a map:

Step 5: Calculate most impacted products
The oec.world site also includes bulk download of HS6 level product data between country pairs.
Below, I show the most impacted products (by dollar value), calculated by taking the difference in scores and multiplying it by the value of the existing trade of that product.
So, for example, two countries that have the same score will have no impact, but perfectly opposed countries (-1 and +1) will have an impact equal to the value of the trade of that item.
Here are the results:

Conclusion
This analysis demonstrates that applying network algorithms like Label Propagation to global trade data can offer valuable insights for building resilient supply chain strategies.
Great analysis! Have you considered including semiconductor trade volumes as a leading indicator in your conflict model?
Hi Alex,
That would be interesting. The data is there (they have that level of detail). The reason I didn’t do much with particular goods is that a lot of them are inputs to other goods which can make things confusing. I would have to think about how to do that cleanly. The data is also from 2022 (I didn’t want to pay for present data) so I worry that the situation has changed a lot in 2025.
Here is the original project folder if you want to try things out. I think the file that generates the map is “alignment.py”.
https://www.mediafire.com/file/9nqoo58vmidx6p7/International+Trade.zip/file
Thanks,
Nathan