Description Usage Arguments Value
convert the uncomtrade data tibble to igraph networks
1 2 3 4 5 | trade_data2net(
trade_data,
Y = TRUE,
weight_var = c("netweight_ton", "trade_value_usd_k")
)
|
trade_data |
a tidyverse like tibble generate by the "polish_data" function |
Y, |
TRUE means we use the year variable to slice the trade data into different pieces and will return a graph list, FALSE means we aggregate the trade information into a single network |
weight_var |
the name of the variable used to determine the edge weight, either cargo weight by metric tone or cargo value by USD 1000 dollars |
a tidygraph object or a tidygraph list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.