How to control the color of internal nodes in sankey diagram in ggplot2
I am creating a sankey diagram with the requirement of specific colors for 2nd level node and same color for 3 level node the data consists of 4 columns with heading EMER, PROV, DIS, COUNT
specify ggsankey color fill from center to left and right
I am building a Sankey diagram using ggsankey in R with 3 columns (org_group, main_mech, and energy_group) I want to make it so all flows from the middle column (energy group) that connect to ambient energy are red with all the others remaining grey. I have only been able to do it from left to right and have not seen a way to change the fill color of the flow based on the left node. Heres my code and first diagram attempt based on the RPubs article I found: