Skip to main content

Force-directed Layout

To get an initial look at our data, let's draw a simple node-link diagram, with tooltips displaying the name for each node.

Visualization

NetPanorama specification


{
"data": [
{
"name": "players",
"format": {"type": "csv"},
"url": "/data/tulip/chess.candidates.1948.1990.csv",
"transform": [{"type": "addIndex", "as": "id"}]
},
{
"name": "games",
"format": {"type": "csv"},
"url": "/data/tulip/wcc.games.1948.1990.csv"
}
],

"networks": [
{
"name": "net",
"nodes": "players",
"links": "games",
"directed": false,
"source_node": [ "Name", "Player 1" ],
"target_node": [ "Name", "Player 2" ]
}
],


"layouts": [
{
"name": "net-layout",
"network": "net",
"type": "d3-force"
}
],
"vis": [
{
"entries": "net.links",
"layout": "net-layout",
"mark": {
"type": "linkpath",
"start": "source",
"end": "target"
}
},
{
"entries": "net.nodes",
"layout": "net-layout",
"mark": {
"type": "circle",
"area": 70,
"fill": "steelblue",
"tooltip": { "field": "Name" }
}
}
]
}