View source: R/network_analysis.R
make_res | R Documentation |
Use the full dataset from prep_data diagram linking processes with commodities shown as flows. Flow magnitude information is not included. The RES is shown for an individual specified period and sector. The nodes are labelled with process_description. This will be changed to an option
make_res( dat, node_labels = process_description, edge_labels = commodity_description, sankey_width = NULL, sankey_height = NULL, font_size = 10, use_weights = T, input_data_type = "vd" )
dat |
Tibble output from prep_data() %>% define_sector_from_*(). |
node_labels |
Column in dat for labelling nodes. |
edge_labels |
Column in dat for labelling edges. |
sankey_width |
Width (in pixels) of sankey. |
sankey_height |
Height (in pixels) of sankey. |
font_size |
Numeric. Font size for RES labels. |
use_weights |
Logical. Whether to represent edge weights in Sankey that contains data for a single period. For data containing more than 1 period, magnitudes are unitary. |
input_data_type |
Character. "vd" or "vdt" |
NetworkD3 Sankey object
data(demos_001_sector) demos_001_sector %>% make_res(period_select = 2005, sector_select = "coal", node_labels = process_description, edge_labels = commodity_description, font_size = 11) data(demos_001_vdt) make_res(demos_001_vdt %>% filter(region == "reg1"), input_data_type = "vdt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.