You can also run this command.
sankeyNetwork(Links = DF, Nodes = nodes, Source = “IDsource”,
Target = “IDtarget”, Value = “value”, NodeID = “name”,
sinksRight=FALSE, LinkGroup = “target”, colourScale = JS(
‘d3.scaleOrdinal()
.domain([“Solar”,”Nuclear”,”Hydro”,”Wind”,”Geothermal”,”Natural Gas”,”Coal”,”Biomass”,”Petroleum”,”Electricity”,”Residential”,”Commericial”,”Industrial”,”Transportation”,”Rejected Energy”,”Exports”,”Energy Services”])
.range([“#FFFF00″,”#FF0000″,”#0000FF”,”#800080″,”#A52A2A”,”#00FFFF”,”#000000″,”#00FF00″,”#008000″,”#FFA500″,”#FAAFBE”,”#FAAFBE”,”#FAAFBE”,”#FAAFBE”,”#C0C0C0″,”#FFA500″,”#808080″])’
),
fontSize = 12, nodeWidth = 20, iterations = 0)
Read more here: Source link