Visualizing Global International Trade

Oamar Gianan
Posted on Nov 6, 2016

When looking at global trade data, it is often a challenge to get quick insights about the relationships between trade partners. This is because of the inherent complexity of the data.
Effective visualizations of trade flows can enhance our understanding of a country's economic activity.

Visualizing Global Trade
The most common way of visualizing flow between countries is drawing lines on a geographic map. This type of visualization is often very effective for small datasets with limited complexity. However, because of the amount of data in global trade and the number of trading partners a country has, the resulting visualization is just a clutter of overlaying arrows with little insight to be drawn. Case in point is the map below.


Figure 1. Map with links overlay.

The source of my global trade data, World Integrated Trade Solution presents a number of visualization techniques to relay insight behind the numbers. Tree maps were used to present each country's trade volume with other countries.


Figure 2. Tree map visualization.

Network graphs where countries are depicted as nodes and links as trade routes was used to show which countries trade with each other. Additional information can be derived from the network graph such as the volume of the trade route; depicted by the thickness of the links, and the proportion of the import and export; depicted by the size of the node.


Figure 3. Network graph visualization.

An Alternative
Visualization of global trade data have to depict a large amount of information. The most important of which are the information of origin and destination, and the volume of trade.
A proposed alternative is the use of chord diagrams. This diagram is a circular plot which can arguably present global trade data in an intuitively graspable way.
Aside from being more visually appealing than Figure 1, some key elements of the design help us gain insight with just a quick glance at the diagram.
• The trading countries are represented by the circle's sectors. Each country is assigned a unique color which can be randomly chosen or can be picked from a gradient scale to depict economic indicators. For example, darker colors can represent higher GDP. For simplicity, a random color was used in this chord diagram.


Figure 4. Circle sectors representing trading countries.

• The flow of trade is encoded by the origin color. In the closeup shown Figure 5, Indonesia is assigned a light blue color, Japan is encoded purple. Hence, the flow from Indonesia to Japan is colored light blue, and the smaller counter flow from Japan to Indonesia is colored purple. The direction of the flow is also indicated by a gap between flow and circle segment at the destination.


Figure 5. Flow representing import and export.

• The volume of trade is indicated by the width of the flow and the radians of each sector. The trade's corresponding dollar value is also indicated by tick marks on the outside of the circle’s segments.
• The net trade movement are identified through the relative differences in the radians. In Figure 5 we see that Japan is a net importer with most of its trade volume incoming rather than out.
Insights Gained
The chord diagram was implemented using circlize library in R. The shiny app was designed to be flexible in terms of choosing which countries to investigate. By picking a few countries at a time, the chord complexity is minimized. The data collected and presented were that of 2010 to 2015. The shiny app can be found here.
A quick look at the trading activities of the members of G8 countries consistently show the United States as the top in trade activity. The United States is a net importer with its import volume overshadowing its exports by as much as 55% in 2010.
Among BRIC nations, China overshadowed all its partners in terms of trade activity throughout the period. Aside from being a net exporter with as much as 63% more exports than imports in 2010, the country showed a steady increase of exports from 2010 to 2014.

Future Work
The visualization is only as good as the data which is available. Upon further investigation of the dataset, it showed that not all countries were able to report their trade activities consistently. The current library used has limitations in terms of interactivity. It would have been better if a user can click on a particular flow and see a breakdown in terms of the product category which makes up the flow. For now, this is augmented by a table next to the chord diagram.

About Author

Oamar Gianan

Oamar Gianan

Oamar Gianan has about 15 years of experience in the information technology industry primarily in cloud computing. He developed a passion for data analysis by working on infrastructure where big data is processed. Before moving to New York,...
View all posts by Oamar Gianan >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp