Skip to content

Instantly share code, notes, and snippets.

@davidakoontz
Last active May 27, 2018 16:52
Show Gist options
  • Save davidakoontz/b8bfff608fa24aa74a62e57c352f07f4 to your computer and use it in GitHub Desktop.
Save davidakoontz/b8bfff608fa24aa74a62e57c352f07f4 to your computer and use it in GitHub Desktop.
Net Worth Example for Value Flow diagram
{"nodes":[
{"name":"Net Worth"},
{"name":"Cash - Original"},
{"name":"Dividens"},
{"name":"Cash In"},
{"name":"Facebook"},
{"name":"RDFN"},
{"name":"SHOP"},
{"name":"CMG"},
{"name":"AMZN"},
{"name":"Holding Cash"},
{"name":"NVDA"},
{"name":"HAS"},
{"name":"Sold"}
],
"links":[
{"source":2,"target":6,"value":3},
{"source":2,"target":5,"value":10},
{"source":1,"target":6,"value":4494},
{"source":1,"target":6,"value":1464},
{"source":1,"target":6,"value":3678},
{"source":4,"target":6,"value":1274},
{"source":4,"target":5,"value":1142},
{"source":5,"target":0,"value":1142},
{"source":6,"target":0,"value":20911},
{"source":1,"target":4,"value":2027},
{"source":1,"target":4,"value":50},
{"source":1,"target":7,"value":4926},
{"source":1,"target":7,"value":5201},
{"source":3,"target":7,"value":9930},
{"source":1,"target":7,"value":9169},
{"source":1,"target":7,"value":870},
{"source":1,"target":7,"value":2742},
{"source":1,"target":7,"value":5770},
{"source":7,"target":0,"value":38611},
{"source":1,"target":7,"value":60},
{"source":1,"target":7,"value":51},
{"source":1,"target":7,"value":435},
{"source":1,"target":7,"value":174},
{"source":1,"target":7,"value":435},
{"source":7,"target":9,"value":180},
{"source":7,"target":9,"value":480},
{"source":7,"target":9,"value":250},
{"source":9,"target":0,"value":480},
{"source":9,"target":0,"value":250},
{"source":1,"target":8,"value":1149},
{"source":1,"target":8,"value":9672},
{"source":1,"target":8,"value":890},
{"source":3,"target":8,"value":1289},
{"source":8,"target":0,"value":13001},
{"source":3,"target":10,"value":2113},
{"source":7,"target":10,"value":673},
{"source":3,"target":10,"value":2707},
{"source":3,"target":11,"value":818},
{"source":3,"target":11,"value":1233},
{"source":10,"target":12,"value":5494},
{"source":11,"target":12,"value":2052},
{"source":12,"target":0,"value":7546}
]}
@davidakoontz
Copy link
Author

Example Sankey data for Net-Worth value flow.

@davidakoontz
Copy link
Author

classic off by ONE - fixed

@davidakoontz
Copy link
Author

This Json data file is used by D3-Sankey diagraming code at: https://beta.observablehq.com/@davidakoontz/d3-sankey-diagram-of-stock-purchases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment