make_trade_network {ITNr} | R Documentation |
make_trade_network
Description
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.
Usage
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 |
Value
International Trade Network - igraph object
[Package ITNr version 0.7.0 Index]