Do import/export baskets show any clustering? Import Basket Clustering

Question: Do import/export baskets show any clustering?

This uses WTO dataset of exporter x importer x year x product. The dataset code is HS_M_0010 for those querying the WTO api.

Notebook Contents:

  1. Load and Clean Data
  2. Pool by Year, data is then Importer x Exporter x Product
  3. Collapse Products dimension from ~96 to 2
  4. Plot PCA scatterplots

Load and Clean Data

Pool by Year

Remove Trading Pairs without much activity

Convert data to percent of total basket

Create economic groups for plotting

Chart

*all with the cavet these represent a paultry amount of the total variance of the data set pre PCA.

Interpretation of above chart:

The left two charts are of import baskets, the right two are of export baskets.

The top two are colored by region and the bottom two are colored by income classification.

There is not much seperation in the import baskets. All regions and income classifications are importing all sorts of things.

There is more visual seperation in the export baskets.

In the top right chart we see East Asia on the right side of the chart in red, while latin america and the carribean on the left in orange.

Further, in the bottom right chart we see seperation by income classification.

The low income cluster in the top left of the chart in red. The lower middle income are represented in the top portion of the chart in green.

The upper middle income form a band of orange seperating the blue high income in the bottom of the chart from the lower income economies in the top of the chart.