make_trade_network function

make_trade_network

make_trade_network

This function takes (import) trade data and cleans it and transforms it into a network. This function can be applied to trade data downloaded from UN Comtrade (download csv and read into R as a dataframe), or any other trade data. You just make sure it has the following column names: reporter_iso, partner_iso and edge_weight. Some dataformats may have different names. Also - it is important to note that this function is for import data.

make_trade_network(DF, threshold, cutoff)

Arguments

  • DF: Dataframe of trade data downloaded (potentially using the comtradr package)
  • threshold: Apply a threshold - TRUE, Extract the backbone - FALSE
  • cutoff: Threshold - cutoff level, Backbone - significance level

Returns

International Trade Network - igraph object

  • Maintainer: Matthew Smith
  • License: GPL-3
  • Last published: 2023-03-31

Useful links