Hi Plotly community!
I’d like to share an app I’ve been working on lately and maybe get some feedback from you about it. It visualizes nine global trade networks for precious metals, stones and related products in 2022. The data for them was obtained using the UN Comtrade API.
Link to the app: https://precious-trade-9495c0104c61.herokuapp.com/
First, a few pictures of what I got, and then the story
There are thousands of products in the Comtrade database, including food, art, spaceships, etc. And initially I wanted to quickly get an idea of how international trade of various goods is organized. You can learn more about the features of a particular trade network by changing the coloring parameter of its nodes: the region to which the country belongs, the number of its trade links, or the export-import balance of its trade.
The second goal here is to identify “hidden” trade connections and territories (bunkers, free trade zones, countries that have closed their statistics). They do not report exports and imports, but we can obtain information from countries that trade with them and record mutual transactions.
Network elements - brief description
The size of the nodes is determined by the total trade volume of the product (imports + exports in $). Each country/territory is linked to its two leading suppliers of this product. The link between two countries reflects the direction of net trade flow between them (the difference in mutual exports). My repo on how to build a similar network: GitHub - lomska/Visualizing-Global-Trade-Networks: Python script that visualizes international commodity trade networks quickly and beautifully
The network is built using Pygraphviz + Cytoscape. The tables are built using AG Grid. Since the grouping option is only available in the enterprise version, I made two tables in separate tabs: one for country totals (node data) and one for trade between countries (edge data). The tables contain detailed data about each country and allow you to sort countries by various indicators.
Open to feedback and any ideas for improvement