Syndicate content

Trade and Competitiveness

Tracing the roots of TCdata360 datasets: an interactive network graph

Reg Onglao's picture

When doing data analysis, it's common for indicators to take the spotlight whereas datasets usually take the backseat as an attribution footnote or as a metadata popup.

However, we often forget how intertwined dataset sources are and how this affects data analysis. For instance, we can never assume that indicators from different datasets are mutually exclusive – it's possible for them to be the same indicator or to have an influence on the other as a component weight in an index, if the other dataset were used as a source for the other.

In this blog, we're interested to see if this applies to TCdata360 by taking a deeper look at its "dataset genealogy" and answer questions such as – Is it safe to do cross-dataset analysis using TCdata360 datasets? Are there interesting patterns in the relationships between TCdata360 datasets?

Quick introduction to network graphs

We call a dataset which serves as a data source for another dataset as "source", and a dataset which pulls indicator data from another as "target". Collectively, all of these are called "nodes".

To see the relationships between TCdata360 datasets, we mapped these in a directed network graph wherein each dataset is a node. By directed, we mean that source nodes are connected to their target nodes through an arrow, since direction is important to identify source from target nodes. For the purposes of this blog, we restricted the network graph to contain datasets within TCdata360 only; thus, all data sources and targets external to TCdata360 will not be included in our analysis.

Here's how the network graph looks like.

Each dataset is represented by a circle (aka "node") and is grouped and color-coded by data owner or institution. The direction from any source to target node is clearer in the interactive version, wherein there's a small arrow on the connecting line which shows the direction from target to source.

Interactive product export streamgraphs with data360r (now in CRAN!)

Reg Onglao's picture

Building beautiful, interactive charts is becoming easier nowadays in R, especially with open source packages such as, ggplot2 and leaflet. But behind the scenes, there is an often untold, gruesome part of creating data visualizations -- downloading, cleaning, and processing data into the correct format.

Making data access and download easier is one of the reasons we developed data360r, recently available on CRAN and the newest addition to the TCdata360 Data Science Corner.

Data360r is a nifty R wrapper for the TCdata360 API, where R users ranging from beginners to experts can easily download trade and competitiveness data, metadata, and resources found in TCdata360 using single-line R functions.

In an earlier blog, we outlined some benefits of using data360r. In this blog, we’ll show you how to make an interactive streamgraph using the data360r and streamgraph packages in just a few lines of code! For more usecases and tips, go to

Introducing Data360R — data to the power of R

Reg Onglao's picture

Last January 2017, the World Bank launched TCdata360 (, a new open data platform that features more than 2,000 trade and competitiveness indicators from 40+ data sources inside and outside the World Bank Group. Users of the website can compare countries, download raw data, create and share data visualizations on social media, get country snapshots and thematic reports, read data stories, connect through an application programming interface (API), and more.

From data blur to slow-mo clarity: big data in trade and competitiveness

Prasanna Lal Das's picture

Tolstoy's War and Peace was the big data of its time. A memorable moment from the epic novel occurs when Prince Andrei awakens following a severe injury on the battlefield. He fears the worst but, "above him there was nothing but the sky, the lofty heavens, not clear, yet immeasurably lofty, with gray clouds slowly drifting across them. 'How quiet, solemn, and serene, not at all as it was when I was running.'" Time appears to slow down and the Prince sees life more lucidly than ever before as he discovers the potential for happiness within him.

In many ways the scene captures what we demand of big data—not the bustle of zillions of data points as confusing as the fog of war, but sharp, clear insights that bring the right information into relief and help us connect strands previously unseen. The question of whether this idea is achievable is the starting point of a paper about big data on trade and competitiveness just published by the World Bank Group. In it, we asked—can big data help policy makers see the world in ways they haven't before? Are decisions that are informed by the vast amounts of data that envelop us better than decisions based on traditional tools? We didn't want a story trumpeting the miracles of big data; we wanted instead to see the reality of big data in action, in its messiness and its splendor.

Things to do with Trade and Competitiveness Data… thank you API

Alberto Sanchez Rodelgo's picture

Who are Spain's neighbors? Is Canada closer to Spain than Portugal? What about Estonia or Greece? The answer? Depends on the data you are looking at!

Earlier this week I crunched data based on a selected list of indicators from the new Open Trade and Competitiveness platform from the World Bank (TCdata360) and found some interesting trends[1]. In 2009 Spain was closer to economies like Estonia, Belgium, France and Canada while 6 years later in 2015, Spain's closest neighbors were Greece and Portugal. How and when did this shift happen?

Other trends I spotted using the same data? It seems the Sub-Saharan region ranks the lowest in Ease of Doing Business, that in 2007 Israel held the record for R&D expenditure as % of GDP, while in the same year Malta topped FDI net inflows as % GDP, and that the largest annual GDP growth in the last 20 years occurred in Equatorial Guinea in 1997.

Figure 1: Dots represent values for an economy at a given point in time for years 1996 to 2016 overlaying their box-plot distributions. Colors correspond to geographical regions.

Doing Business Trading Across Borders and Logistics Performance Index: similar yet different

Valentina Saltane's picture

People who look at the Doing Business report’s Trading Across Borders indicator and the Logistics Performance Index (LPI) often wonder why one country can perform well on one of the rankings but not so well on the other although they both measure trade and logistics. In fact, earlier this year, the Doing Business team organized a workshop at the World Bank Global Knowledge and Research Hub in Kuala Lumpur to clarify the differences between the two datasets.

Let’s start off with a few definitions:

The Doing Business report is a World Bank Group flagship publication, which covers 11 areas of business regulations. Trading Across Borders is one of these areas. It looks specifically at the logistical processes of exporting and importing. Data is updated annually and the latest edition covers 190 economies. Doing Business collects data from local experts and measures performance as reported by domestic entrepreneurs, while taking into consideration factual laws and regulations.

The Logistics Performance Index is a benchmarking tool which focuses on trade logistics. It is created to help countries identify the challenges and opportunities they face as they relate to customs, border management, transport infrastructure, and logistics services. Updated biennially, the latest data and report cover 160 economies. Data is collected from global freight forwarders and express carriers who provide feedback on the logistical “friendliness” of the countries they operate.