Skip to content

Instantly share code, notes, and snippets.

Created December 10, 2012 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4250342 to your computer and use it in GitHub Desktop.
Save anonymous/4250342 to your computer and use it in GitHub Desktop.
QuantHistLing Witotoan dictionaries, spanish stem "comer"
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node text {
pointer-events: none;
font: 10px sans-serif;
}
.link {
stroke: #999;
stroke-opacity: .6;
}
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var color = d3.scale.category20();
var width = 960,
height = 600
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
var force = d3.layout.force()
.gravity(.05)
.distance(80)
.charge(-250)
.size([width, height]);
d3.json("swadesh_data.json", function(error, json) {
force
.nodes(json.nodes)
.links(json.links)
.start();
var link = svg.selectAll("line.link")
.data(json.links)
.enter().append("line")
.attr("class", "link");
var node = svg.selectAll("circle.node")
.data(json.nodes)
.enter().append("g")
.attr("class", "node")
.call(force.drag);
node.append("circle")
.attr("r", 5)
.style("fill", function(d) { return color(d.group); })
node.append("text")
.attr("dx", 12)
.attr("dy", ".35em")
.text(function(d) { return d.id });
force.on("tick", function() {
link.attr("x1", function(d) { return d.source.x; })
.attr("y1", function(d) { return d.source.y; })
.attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; });
node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
});
});
</script>
</body>
{"directed": false, "graph": [], "nodes": [{"id": " hay que comer"}, {"id": "e\u0301cagoi\u0335"}, {"id": "rin\u0303o"}, {"id": "ri\u0335ti\u0335maki\u0335"}, {"id": "tya ja\u0301hooxo"}, {"id": "hto"}, {"id": "maki\u0335"}, {"id": "za"}, {"id": " no comas"}, {"id": "guigaba"}, {"id": "majcho"}, {"id": "gui\u0300lle"}, {"id": "tya a\u0301chooxo"}, {"id": "tya ja\u0301joojiyi"}, {"id": "spa"}, {"id": "o\u0301bajaquimaje"}, {"id": " comemos"}, {"id": "guin\u0303o"}, {"id": " ellos comen"}, {"id": "guiyeza"}, {"id": "jaaidi\u0335maki\u0335"}, {"id": "ma\u0301chu"}, {"id": "okode"}, {"id": "eng"}, {"id": "ati\u0335yeza"}, {"id": "come con ellos"}, {"id": "jaanoti\u0335ke"}, {"id": "i\u0335buiya"}, {"id": "comida"}, {"id": "ma\u0301chuhi"}, {"id": " fi\u0335noka"}, {"id": "n\u0303a ja\u0301dyaaji"}, {"id": "oxo\u0301o\u0301xa"}, {"id": "ri\u0335dode"}, {"id": "com|stem"}, {"id": "fi\u0335node"}, {"id": "lo come"}, {"id": "oko\u0301ri*"}, {"id": "comer mucho"}, {"id": "ri\u0335no"}, {"id": "n\u0303o"}, {"id": "fi\u0335cade"}, {"id": "jaain\u0303eno"}, {"id": "bmr"}, {"id": "gu\u0308ille"}, {"id": "se lo come"}, {"id": "no"}, {"id": "n\u0303eno"}, {"id": "di\u0335"}, {"id": "hux"}, {"id": "uum\u0308ajah ja\u0301hooxo"}, {"id": "gui\u0300ga"}, {"id": "tya ja\u0301goonjin"}, {"id": "ma\u0301chu\u0301ta"}, {"id": "hay que comer"}, {"id": "for eating"}, {"id": "comer algo"}, {"id": "oko\u0301yena*"}, {"id": "huu"}, {"id": "i\u0335buide"}, {"id": "(you) must eat"}, {"id": " i\u0335buika"}, {"id": "ri\u0335ti\u0335kai\u0335"}, {"id": "gui\u0300te"}, {"id": "para comer"}, {"id": "guin\u0303eno"}, {"id": "oca"}, {"id": "la comida"}, {"id": "ono"}, {"id": "fi\u0335nua"}, {"id": "ti\u0335"}, {"id": "oco\u0301lle"}, {"id": "boa"}, {"id": "guigabai\u0335ei\u0335"}, {"id": " come"}, {"id": "comer"}], "links": [{"source": 0, "target": 14}, {"source": 1, "target": 5}, {"source": 2, "target": 58}, {"source": 3, "target": 58}, {"source": 4, "target": 66}, {"source": 5, "target": 41}, {"source": 5, "target": 44}, {"source": 5, "target": 71}, {"source": 5, "target": 33}, {"source": 5, "target": 34}, {"source": 6, "target": 58}, {"source": 7, "target": 58}, {"source": 8, "target": 14}, {"source": 9, "target": 58}, {"source": 10, "target": 72}, {"source": 11, "target": 58}, {"source": 12, "target": 66}, {"source": 13, "target": 66}, {"source": 14, "target": 54}, {"source": 14, "target": 16}, {"source": 14, "target": 56}, {"source": 14, "target": 38}, {"source": 14, "target": 25}, {"source": 14, "target": 36}, {"source": 14, "target": 64}, {"source": 14, "target": 67}, {"source": 14, "target": 18}, {"source": 14, "target": 45}, {"source": 14, "target": 28}, {"source": 14, "target": 74}, {"source": 14, "target": 34}, {"source": 14, "target": 75}, {"source": 15, "target": 43}, {"source": 17, "target": 58}, {"source": 19, "target": 58}, {"source": 20, "target": 58}, {"source": 21, "target": 43}, {"source": 22, "target": 58}, {"source": 23, "target": 60}, {"source": 23, "target": 55}, {"source": 23, "target": 34}, {"source": 24, "target": 58}, {"source": 26, "target": 58}, {"source": 27, "target": 58}, {"source": 29, "target": 43}, {"source": 30, "target": 58}, {"source": 31, "target": 66}, {"source": 32, "target": 66}, {"source": 34, "target": 43}, {"source": 34, "target": 66}, {"source": 34, "target": 72}, {"source": 34, "target": 49}, {"source": 34, "target": 58}, {"source": 35, "target": 58}, {"source": 37, "target": 49}, {"source": 39, "target": 58}, {"source": 40, "target": 58}, {"source": 42, "target": 58}, {"source": 43, "target": 53}, {"source": 46, "target": 58}, {"source": 47, "target": 58}, {"source": 48, "target": 58}, {"source": 49, "target": 57}, {"source": 50, "target": 66}, {"source": 51, "target": 58}, {"source": 52, "target": 66}, {"source": 58, "target": 62}, {"source": 58, "target": 59}, {"source": 58, "target": 70}, {"source": 58, "target": 61}, {"source": 58, "target": 63}, {"source": 58, "target": 65}, {"source": 58, "target": 68}, {"source": 58, "target": 69}, {"source": 58, "target": 73}], "multigraph": false}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment