Created
July 7, 2022 08:01
-
-
Save parthi2929/a39ffff9c5442af742958044f4610114 to your computer and use it in GitHub Desktop.
Sample data for circular sankey illustration for renbloc linkedin post by Nils Söderström
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let data = { | |
"nodes": [ | |
{ | |
"name": "Grid-2" | |
}, | |
{ | |
"name": "Grid-1" | |
}, | |
{ | |
"name": "Solar" | |
}, | |
{ | |
"name": "Site" | |
}, | |
{ | |
"name": "Other" | |
}, | |
{ | |
"name": "Hotel" | |
}, | |
{ | |
"name": "Kulturhus" | |
}, | |
{ | |
"name": "Energy Central" | |
}, | |
{ | |
"name": "BESS charging" | |
} | |
], | |
"links": [ | |
{ | |
"source": "Grid-2", | |
"target": "Site", | |
"value": "237", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Grid-1", | |
"target": "Site", | |
"value": "202", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Solar", | |
"target": "Site", | |
"value": "100", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Site", | |
"target": "Other", | |
"value": "304", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Site", | |
"target": "Hotel", | |
"value": "184", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Site", | |
"target": "Kulturhus", | |
"value": "41", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Site", | |
"target": "Energy Central", | |
"value": "7", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Site", | |
"target": "BESS charging", | |
"value": "3", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Other", | |
"target": "Solar", | |
"value": "50", | |
"optimal": "yes" | |
}, | |
{ | |
"source": "Hotel", | |
"target": "Solar", | |
"value": "10", | |
"optimal": "yes" | |
} | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The related post is here
You could use above data for this sankey example
In index.html of above example, include above js, and remove data in index.js (or use renamed data variable, or whatever)
The result you would be getting should be something like this.. (I used my own tinkered script from above example)
![image](https://user-images.githubusercontent.com/11896263/177723860-214c0c8a-2017-41e1-a751-695cb05be766.png)