View source: R/make_trade_network_function.R
make_trade_network | R Documentation |
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)
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 |
International Trade Network - igraph object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.