Last active
April 21, 2017 09:22
-
-
Save seouri/4491066 to your computer and use it in GitHub Desktop.
Red: 1st degree edges from Warner, Green: 2nd degree edges from Warner
This file contains hidden or 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> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
| <title>Biomedical Informatics Co-authorship Network</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?1.29.1"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.29.1"></script> | |
| <style type="text/css"> | |
| path.link { | |
| fill: none; | |
| stroke: #ddd; | |
| stroke-width: 1px; | |
| } | |
| marker#licensing { | |
| fill: green; | |
| } | |
| path.link.first { | |
| stroke: #900; | |
| } | |
| path.link.second { | |
| stroke: #090; | |
| } | |
| path.link.resolved { | |
| stroke-dasharray: 0,2 1; | |
| } | |
| circle { | |
| fill: #666; | |
| stroke: #333; | |
| stroke-width: 0px; | |
| } | |
| text { | |
| font: 10px sans-serif; | |
| pointer-events: none; | |
| } | |
| text.shadow { | |
| stroke: #fff; | |
| stroke-width: 3px; | |
| stroke-opacity: .8; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> | |
| var links = [ | |
| { "source": "ALTMAN, RUSS B", "target": "BRINKLEY, JAMES F", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "FRIEDMAN, CHARLES P", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "KOHANE, ISAAC S", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "MOONEY, SEAN D", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "RUBIN, DANIEL L", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "SHAH, NIGAM H", "type": ""}, | |
| { "source": "ALTMAN, RUSS B", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "CIMINO, JAMES J", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "DYKES, PATRICIA C", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "FRIEDMAN, CAROL", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "HAMMOND, W EDWARD", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "KAUFMAN, DAVID R", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "VAWDREY, DAVID K", "type": ""}, | |
| { "source": "BAKKEN, SUZANNE R", "target": "WILCOX, ADAM B", "type": ""}, | |
| { "source": "BARNETT, G OCTO", "target": "CIMINO, JAMES J", "type": ""}, | |
| { "source": "BARNETT, G OCTO", "target": "GREENES, ROBERT A", "type": ""}, | |
| { "source": "BARNETT, G OCTO", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "BARNETT, G OCTO", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "BARNETT, G OCTO", "target": "KOHANE, ISAAC S", "type": ""}, | |
| { "source": "BARNETT, G OCTO", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "BARNETT, G OCTO", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "FRISSE, MARK E", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "GARDNER, REED M", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "GREENES, ROBERT A", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "JOHNSON, KEVIN B", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "MIDDLETON, BLACKFORD", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "TANG, PAUL C", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "WILCOX, ADAM B", "type": ""}, | |
| { "source": "BATES, DAVID W", "target": "YASNOFF, WILLIAM A", "type": ""}, | |
| { "source": "BRINKLEY, JAMES F", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "BRINKLEY, JAMES F", "target": "RUBIN, DANIEL L", "type": ""}, | |
| { "source": "CHIANG, MICHAEL F", "target": "CIMINO, JAMES J", "type": ""}, | |
| { "source": "CHIANG, MICHAEL F", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "CHIANG, MICHAEL F", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "DYKES, PATRICIA C", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "ELHADAD, NOEMIE", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "FRIEDMAN, CAROL", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "GREENES, ROBERT A", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "HAMMOND, W EDWARD", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "CIMINO, JAMES J", "target": "KAUFMAN, DAVID R", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "NARUS, SCOTT P", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "CIMINO, JAMES J", "target": "VAWDREY, DAVID K", "type": ""}, | |
| { "source": "CLEMMER, TERRY P", "target": "GARDNER, REED M", "type": "second"}, | |
| { "source": "CLEMMER, TERRY P", "target": "VAWDREY, DAVID K", "type": "second"}, | |
| { "source": "CLEMMER, TERRY P", "target": "WARNER, HOMER R", "type": "first"}, | |
| { "source": "CUSHMAN, REID", "target": "GOODMAN, KENNETH W", "type": ""}, | |
| { "source": "DEV, PARVATI", "target": "FRIEDMAN, CAROL", "type": ""}, | |
| { "source": "DEV, PARVATI", "target": "FRIEDMAN, CHARLES P", "type": ""}, | |
| { "source": "DEV, PARVATI", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "DEV, PARVATI", "target": "RUBIN, DANIEL L", "type": ""}, | |
| { "source": "DEV, PARVATI", "target": "SILVERSTEIN, JONATHAN C", "type": ""}, | |
| { "source": "DYKES, PATRICIA C", "target": "MIDDLETON, BLACKFORD", "type": ""}, | |
| { "source": "ELHADAD, NOEMIE", "target": "FRIEDMAN, CAROL", "type": ""}, | |
| { "source": "ELHADAD, NOEMIE", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "ELHADAD, NOEMIE", "target": "KAUFMAN, DAVID R", "type": ""}, | |
| { "source": "ELHADAD, NOEMIE", "target": "WILCOX, ADAM B", "type": ""}, | |
| { "source": "EMBI, PETER J", "target": "GOODMAN, KENNETH W", "type": ""}, | |
| { "source": "EMBI, PETER J", "target": "GREENES, ROBERT A", "type": ""}, | |
| { "source": "EMBI, PETER J", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "EMBI, PETER J", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "EVANS, SCOTT", "target": "MCDONALD, CLEMENT J", "type": ""}, | |
| { "source": "FLORANCE, VALERIE", "target": "FRISSE, MARK E", "type": ""}, | |
| { "source": "FOSTER, IAN", "target": "PAYNE, PHILIP R", "type": "resolved"}, | |
| { "source": "FRIEDMAN, CAROL", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "FRIEDMAN, CAROL", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "FRIEDMAN, CAROL", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "FRIEDMAN, CAROL", "target": "MILLER, RANDOLPH A", "type": ""}, | |
| { "source": "FRIEDMAN, CAROL", "target": "SHAH, NIGAM H", "type": ""}, | |
| { "source": "FRIEDMAN, CAROL", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "FRIEDMAN, CHARLES P", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "FRIEDMAN, CHARLES P", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "FRIEDMAN, CHARLES P", "target": "KOHANE, ISAAC S", "type": ""}, | |
| { "source": "FRIEDMAN, CHARLES P", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "FRIEDMAN, CHARLES P", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "FRIEDMAN, CHARLES P", "target": "WYATT, JEREMY C", "type": ""}, | |
| { "source": "FRISSE, MARK E", "target": "GREENES, ROBERT A", "type": ""}, | |
| { "source": "FRISSE, MARK E", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "FRISSE, MARK E", "target": "JOHNSON, KEVIN B", "type": ""}, | |
| { "source": "FRISSE, MARK E", "target": "MIDDLETON, BLACKFORD", "type": ""}, | |
| { "source": "FRISSE, MARK E", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "FRISSE, MARK E", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "FRISSE, MARK E", "target": "WILCOX, ADAM B", "type": ""}, | |
| { "source": "GARDNER, REED M", "target": "HRIPCSAK, GEORGE", "type": ""}, | |
| { "source": "GARDNER, REED M", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "GARDNER, REED M", "target": "JOHNSON, KEVIN B", "type": ""}, | |
| { "source": "GARDNER, REED M", "target": "MILLER, RANDOLPH A", "type": ""}, | |
| { "source": "GARDNER, REED M", "target": "VAWDREY, DAVID K", "type": ""}, | |
| { "source": "GOODMAN, KENNETH W", "target": "HAMMOND, W EDWARD", "type": ""}, | |
| { "source": "GOODMAN, KENNETH W", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "GOODMAN, KENNETH W", "target": "LAVENTURE, MARTIN", "type": ""}, | |
| { "source": "GOODMAN, KENNETH W", "target": "ROSS, DAVID A", "type": ""}, | |
| { "source": "GOODMAN, KENNETH W", "target": "YASNOFF, WILLIAM A", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "HERSH, WILLIAM R", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "GREENES, ROBERT A", "target": "KAUFMAN, DAVID R", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "MIDDLETON, BLACKFORD", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "GREENES, ROBERT A", "target": "TANG, PAUL C", "type": ""}, | |
| { "source": "GREENSPAN, HAYIT K", "target": "RUBIN, DANIEL L", "type": ""}, | |
| { "source": "HAMMOND, W EDWARD", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "HAMMOND, W EDWARD", "target": "LAVENTURE, MARTIN", "type": ""}, | |
| { "source": "HAMMOND, W EDWARD", "target": "MCDONALD, CLEMENT J", "type": ""}, | |
| { "source": "HAMMOND, W EDWARD", "target": "MIDDLETON, BLACKFORD", "type": ""}, | |
| { "source": "HAMMOND, W EDWARD", "target": "ROSS, DAVID A", "type": ""}, | |
| { "source": "HAMMOND, W EDWARD", "target": "TANG, PAUL C", "type": ""}, | |
| { "source": "HAMMOND, W EDWARD", "target": "YASNOFF, WILLIAM A", "type": ""}, | |
| { "source": "HERSH, WILLIAM R", "target": "HUFF, STANLEY M", "type": "second"}, | |
| { "source": "HERSH, WILLIAM R", "target": "JIMISON, HOLLY B", "type": ""}, | |
| { "source": "HERSH, WILLIAM R", "target": "MIDDLETON, BLACKFORD", "type": ""}, | |
| { "source": "HERSH, WILLIAM R", "target": "MILLER, RANDOLPH A", "type": ""}, | |
| { "source": "HERSH, WILLIAM R", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "HERSH, WILLIAM R", "target": "SILVERSTEIN, JONATHAN C", "type": ""}, | |
| { "source": "HERSH, WILLIAM R", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "JOHNSON, KEVIN B", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "KAUFMAN, DAVID R", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "MIDDLETON, BLACKFORD", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "MILLER, RANDOLPH A", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "NARUS, SCOTT P", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "VAWDREY, DAVID K", "type": ""}, | |
| { "source": "HRIPCSAK, GEORGE", "target": "WILCOX, ADAM B", "type": ""}, | |
| { "source": "HUFF, STANLEY M", "target": "JOHNSON, KEVIN B", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "LAVENTURE, MARTIN", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "MCDONALD, CLEMENT J", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "MUSEN, MARK A", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "NARUS, SCOTT P", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "PATEL, VIMLA L", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "ROSS, DAVID A", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "SHORTLIFFE, EDWARD H", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "WARNER, HOMER R", "type": "first"}, | |
| { "source": "HUFF, STANLEY M", "target": "WILCOX, ADAM B", "type": "second"}, | |
| { "source": "HUFF, STANLEY M", "target": "YASNOFF, WILLIAM A", "type": "second"}, | |
| { "source": "JOHNSON, KEVIN B", "target": "KAUFMAN, DAVID R", "type": ""}, | |
| { "source": "JOHNSON, KEVIN B", "target": "MILLER, RANDOLPH A", "type": ""}, | |
| { "source": "JOHNSON, KEVIN B", "target": "WILCOX, ADAM B", "type": ""}, | |
| { "source": "KAUFMAN, DAVID R", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "KAUFMAN, DAVID R", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "KAUFMAN, DAVID R", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "KOHANE, ISAAC S", "target": "MANDL, KENNETH D", "type": ""}, | |
| { "source": "KOHANE, ISAAC S", "target": "MCDONALD, CLEMENT J", "type": ""}, | |
| { "source": "KOHANE, ISAAC S", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "KOHANE, ISAAC S", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "KOHANE, ISAAC S", "target": "RUBIN, DANIEL L", "type": ""}, | |
| { "source": "KOHANE, ISAAC S", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "LAVENTURE, MARTIN", "target": "ROSS, DAVID A", "type": ""}, | |
| { "source": "LAVENTURE, MARTIN", "target": "YASNOFF, WILLIAM A", "type": ""}, | |
| { "source": "MANDL, KENNETH D", "target": "TANG, PAUL C", "type": ""}, | |
| { "source": "MIDDLETON, BLACKFORD", "target": "MILLER, RANDOLPH A", "type": ""}, | |
| { "source": "MIDDLETON, BLACKFORD", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "MIDDLETON, BLACKFORD", "target": "YASNOFF, WILLIAM A", "type": ""}, | |
| { "source": "MILLER, RANDOLPH A", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "MILLER, RANDOLPH A", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "MILLER, RANDOLPH A", "target": "RUBIN, DANIEL L", "type": ""}, | |
| { "source": "MILLER, RANDOLPH A", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "MOONEY, SEAN D", "target": "MUSEN, MARK A", "type": ""}, | |
| { "source": "MOONEY, SEAN D", "target": "SHAH, NIGAM H", "type": ""}, | |
| { "source": "MUSEN, MARK A", "target": "OWENS, DOUGLAS K", "type": ""}, | |
| { "source": "MUSEN, MARK A", "target": "OZBOLT, JUDY G", "type": ""}, | |
| { "source": "MUSEN, MARK A", "target": "PATEL, VIMLA L", "type": ""}, | |
| { "source": "MUSEN, MARK A", "target": "RUBIN, DANIEL L", "type": ""}, | |
| { "source": "MUSEN, MARK A", "target": "SHAH, NIGAM H", "type": ""}, | |
| { "source": "MUSEN, MARK A", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "MUSEN, MARK A", "target": "TENENBAUM, JESSICA D", "type": ""}, | |
| { "source": "NARUS, SCOTT P", "target": "WILCOX, ADAM B", "type": ""}, | |
| { "source": "OWENS, DOUGLAS K", "target": "SOX, HAROLD C", "type": ""}, | |
| { "source": "OZBOLT, JUDY G", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "PATEL, VIMLA L", "target": "SHORTLIFFE, EDWARD H", "type": ""}, | |
| { "source": "PATEL, VIMLA L", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "PATEL, VIMLA L", "target": "TANG, PAUL C", "type": ""}, | |
| { "source": "ROSS, DAVID A", "target": "YASNOFF, WILLIAM A", "type": ""}, | |
| { "source": "RUBIN, DANIEL L", "target": "SHAH, NIGAM H", "type": ""}, | |
| { "source": "RUBIN, DANIEL L", "target": "TENENBAUM, JESSICA D", "type": ""}, | |
| { "source": "SHAH, NIGAM H", "target": "TENENBAUM, JESSICA D", "type": ""}, | |
| { "source": "SHORTLIFFE, EDWARD H", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "SHORTLIFFE, EDWARD H", "target": "TANG, PAUL C", "type": ""}, | |
| { "source": "SHORTLIFFE, EDWARD H", "target": "YASNOFF, WILLIAM A", "type": ""}, | |
| { "source": "SILVERSTEIN, JONATHAN C", "target": "STARREN, JUSTIN B", "type": ""}, | |
| { "source": "VAWDREY, DAVID K", "target": "WILCOX, ADAM B", "type": "" } | |
| ]; | |
| var nodes = {}; | |
| // Compute the distinct nodes from the links. | |
| links.forEach(function(link) { | |
| link.source = nodes[link.source] || (nodes[link.source] = {name: link.source}); | |
| link.target = nodes[link.target] || (nodes[link.target] = {name: link.target}); | |
| }); | |
| var w = 1280, | |
| h = 960; | |
| var force = d3.layout.force() | |
| .nodes(d3.values(nodes)) | |
| .links(links) | |
| .size([w, h]) | |
| .linkDistance(350) | |
| .gravity(0.1) | |
| .charge(-250) | |
| .on("tick", tick) | |
| .start(); | |
| var svg = d3.select("body").append("svg:svg") | |
| .attr("width", w) | |
| .attr("height", h); | |
| // Per-type markers, as they don't inherit styles. | |
| svg.append("svg:defs").selectAll("marker") | |
| .data(["first", "second", "resolved"]) | |
| .enter().append("svg:marker") | |
| .attr("id", String) | |
| .attr("viewBox", "0 -5 10 10") | |
| .attr("refX", 15) | |
| .attr("refY", -1.5) | |
| .attr("markerWidth", 6) | |
| .attr("markerHeight", 6) | |
| .attr("orient", "auto") | |
| .append("svg:path") | |
| .attr("d", "M0,-5L10,0L0,5"); | |
| var path = svg.append("svg:g").selectAll("path") | |
| .data(force.links()) | |
| .enter().append("svg:path") | |
| .attr("class", function(d) { return "link " + d.type; }); | |
| //.attr("marker-end", function(d) { return "url(#" + d.type + ")"; }); | |
| var circle = svg.append("svg:g").selectAll("circle") | |
| .data(force.nodes()) | |
| .enter().append("svg:circle") | |
| .attr("r", 5) | |
| .call(force.drag); | |
| var text = svg.append("svg:g").selectAll("g") | |
| .data(force.nodes()) | |
| .enter().append("svg:g"); | |
| // A copy of the text with a thick white stroke for legibility. | |
| text.append("svg:text") | |
| .attr("x", 8) | |
| .attr("y", ".31em") | |
| .attr("class", "shadow") | |
| .text(function(d) { return d.name; }); | |
| text.append("svg:text") | |
| .attr("x", 8) | |
| .attr("y", ".31em") | |
| .text(function(d) { return d.name; }); | |
| // Use elliptical arc path segments to doubly-encode directionality. | |
| function tick() { | |
| path.attr("d", function(d) { | |
| var dx = d.target.x - d.source.x, | |
| dy = d.target.y - d.source.y, | |
| dr = Math.sqrt(dx * dx + dy * dy); | |
| return "M" + d.source.x + "," + d.source.y + "A" + dr + "," + dr + " 0 0,1 " + d.target.x + "," + d.target.y; | |
| }); | |
| circle.attr("transform", function(d) { | |
| return "translate(" + d.x + "," + d.y + ")"; | |
| }); | |
| text.attr("transform", function(d) { | |
| return "translate(" + d.x + "," + d.y + ")"; | |
| }); | |
| } | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment