make_trade_network: make_trade_network

View source: R/make_trade_network_function.R

make_trade_networkR 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


MatthewSmith430/ITNr documentation built on April 15, 2024, 8:05 a.m.