I am trying to make a network visualisation of RISK. You can view it with the required code at http://bl.ocks.org/4683850.
The visualisation works but it required a lot of manual labor. I manually adapted the json file such that the connections were of the following shape:
{
"source": 1,
"target": 0,
"value": 5
}
What would one need to do to the d3 code such that a connection is determined by the names of the nodes? The input would then be:
{
"source": "WesternAustralia",
"target": "NewGuinea",
"value": 5
}
Whenever I try that I get the following error:
Uncaught TypeError: Cannot call method 'push' of undefined