Last active
January 31, 2016 22:37
-
-
Save bennpearson/8ebcbdd0429a97ed883d to your computer and use it in GitHub Desktop.
FOAF - Actors
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
<!doctype html> | |
<meta charset="utf-8"> | |
<script src="http://www.d3plus.org/js/d3.js"></script> | |
<script src="http://www.d3plus.org/js/d3plus.js"></script> | |
<div id="viz"></div> | |
<script> | |
var sample_data = [ | |
{"name": "derek jacobi", "size": 10}, | |
{"name": "judi dench", "size": 12}, | |
{"name": "kenneth branagh", "size": 30}, | |
{"name": "colin blakely", "size": 26}, | |
{"name": "jane lapotaire", "size": 12}, | |
{"name": "jenny agutter", "size": 6}, | |
{"name": "sinead cusack", "size": 11}, | |
{"name": "eric porter", "size": 4} | |
] | |
var connections = [ | |
{"source": "derek jacobi", "target": "judi dench"}, | |
{"source": "derek jacobi", "target": "kenneth branagh"}, | |
{"source": "judi dench", "target": "colin blakely"}, | |
{"source": "judi dench", "target": "jane lapotaire"}, | |
{"source": "jenny agutter", "target": "kenneth branagh"}, | |
{"source": "sinead cusack", "target": "kenneth branagh"}, | |
{"source": "eric porter", "target": "kenneth branagh"} | |
] | |
var visualization = d3plus.viz() | |
.container("#viz") | |
.type("network") | |
.data(sample_data) | |
.edges(connections) | |
.size("size") | |
.id("name") | |
.draw() | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment