trade_data2net: convert the uncomtrade data tibble to igraph networks

Description Usage Arguments Value

View source: R/trade2net.r

Description

convert the uncomtrade data tibble to igraph networks

Usage

1
2
3
4
5
trade_data2net(
  trade_data,
  Y = TRUE,
  weight_var = c("netweight_ton", "trade_value_usd_k")
)

Arguments

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

Value

a tidygraph object or a tidygraph list


zlfccnu/econophysics documentation built on Feb. 23, 2022, 10:22 p.m.