Code
make_sankey_inps(df, inps)
Output
$labels
[1] "plate appearance" "Single - 23%" "Double - 2%"
[4] "triple - 0%" "Homerun - 0%" "Base on balls - 19%"
[7] "Hit by pitch - 5%" "Strikeout - 19%" "Out - 33%"
$colors
[1] "blue" "green" "green" "green" "green" "orange" "orange" "red"
[9] "red"
$sources
[1] 0 0 0 0 0 0 0 0
$targets
[1] 1 2 3 4 5 6 7 8
$values
[1] 0.23255814 0.02325581 0.00000000 0.00000000 0.18604651 0.04651163 0.18604651
[8] 0.32558140
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.