Here is the data using 3 nodes (visualization would not be very useful with two nodes):
var data = [{
"name": "iit.mumbai.pub1",
"imports": ["iit.chennai.pub3"]
}, {
"name": "iit.delhi.pub2",
"imports": ["iit.mumbai.pub1"]
}, {
"name": "iit.chennai.pub3",
"imports": ["iit.delhi.pub2"]
}];
Here's what it looks like: https://bl.ocks.org/ckothari/raw/473320621a15a7ee1ed684bf3feb4255/ .
I gave an example of academic publications in the above example. The points in the names represent hierarchical relationships, therefore in this example iit(Institute) there are 3 children (locations) mumbai, delhiand chennai, and they have children (publications) pub1, pub2and pub3accordingly.
imports json . pub1 pub3, pub2 pub1 pub3 pub2.