A Sankey diagram is a flow diagram in which the width of the lines is proportional to the rate of energy flow. Sankey diagrams are a helpful way to visualize energy flows in an energy conversion chain (ECC). This function takes a matrix description of an ECC and produces a Sankey diagram.
Usage
make_sankey(
.sutmats = NULL,
R = Recca::psut_cols$R,
U = Recca::psut_cols$U,
V = Recca::psut_cols$V,
Y = Recca::psut_cols$Y,
simplify_edges = TRUE,
sankey = Recca::sankey_cols$sankey,
...
)
Arguments
- .sutmats
an optional wide-by-matrices data frame
- R, U, V, Y
See
Recca::psut_cols
.- simplify_edges
a boolean which tells whether edges should be simplified. Applies to every row of
.sutmats
if.sutmats
is specified.- sankey
See
Recca::sankey_cols
.- ...
Arguments passed to
networkD3::sankeyNetwork()
, mostly for formatting purposes.
Details
At present, this function uses the networkD3
package to draw the Sankey diagram.
If any of R
, U
, V
, or Y
is NA
, NA
is returned.