{"url":"https://api.github.com/gists/5369146","forks_url":"https://api.github.com/gists/5369146/forks","commits_url":"https://api.github.com/gists/5369146/commits","id":"5369146","node_id":"MDQ6R2lzdDUzNjkxNDY=","git_pull_url":"https://gist.github.com/5369146.git","git_push_url":"https://gist.github.com/5369146.git","html_url":"https://gist.github.com/mbostock/5369146","files":{".block":{"filename":".block","type":"text/plain","language":null,"raw_url":"https://gist.githubusercontent.com/mbostock/5369146/raw/703d310b399098a243a76a50bc209167e924cfd2/.block","size":17,"truncated":false,"content":"license: gpl-3.0\n","encoding":"utf-8"},"README.md":{"filename":"README.md","type":"text/markdown","language":"Markdown","raw_url":"https://gist.githubusercontent.com/mbostock/5369146/raw/e1aeb54c6d3148883e5a48816ae8aca5f8905c7b/README.md","size":419,"truncated":false,"content":"This animation demonstrates how [selection.selectAll](https://github.com/mbostock/d3/wiki/Selections#wiki-selectAll) works: every element in the old selection becomes a group in the new selection. Here, an initial selection of table rows is then used to create a selection of table cells:\n\n```js\nd3.selectAll(\"tr\").selectAll(\"td\");\n```\n\nThe result is a selection of table cells (td elements) grouped by their table row.","encoding":"utf-8"},"index.html":{"filename":"index.html","type":"text/html","language":"HTML","raw_url":"https://gist.githubusercontent.com/mbostock/5369146/raw/9f305a8f97e5313aaf26b83a2870d2f7f9c5ddcd/index.html","size":10221,"truncated":false,"content":"<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n\n.node text {\n  font: 10px sans-serif;\n}\n\n.join,\n.link,\n.node rect {\n  fill: none;\n  stroke: #636363;\n  stroke-width: 1.5px;\n}\n\n.right text {\n  text-anchor: end;\n}\n\n.node rect {\n  fill: white;\n}\n\n.link path,\n.node rect,\n.node text {\n  -webkit-transition: fill-opacity 500ms linear, stroke-opacity 500ms linear, stroke 500ms linear, fill 500ms linear;\n  -moz-transition: fill-opacity 500ms linear, stroke-opacity 500ms linear, stroke 500ms linear, fill 500ms linear;\n  -ms-transition: fill-opacity 500ms linear, stroke-opacity 500ms linear, stroke 500ms linear, fill 500ms linear;\n  -o-transition: fill-opacity 500ms linear, stroke-opacity 500ms linear, stroke 500ms linear, fill 500ms linear;\n  transition: fill-opacity 500ms linear, stroke-opacity 500ms linear, stroke 500ms linear, fill 500ms linear;\n}\n\n.node .array rect {\n  stroke: #636363;\n}\n\n.node .element rect {\n  fill: #bdbdbd;\n  stroke: none;\n}\n\n.node .null rect {\n  fill: none;\n  stroke: none;\n}\n\n.node .null text {\n  fill: #636363;\n}\n\n.node .function rect {\n  stroke: #3182bd;\n}\n\n.node .selection rect {\n  stroke: #e6550d;\n}\n\n.node .data rect {\n  fill: #d9d9d9;\n  stroke: none;\n}\n\n.node .code text {\n  font-family: monospace;\n}\n\n.node .key rect {\n  fill: #a1d99b;\n  stroke: none;\n}\n\n.link .to-data {\n  stroke: #ddd;\n}\n\n.link .to-element {\n  stroke: #bdbdbd;\n}\n\n.link .to-key,\n.join {\n  stroke: #a1d99b;\n}\n\n.join {\n  stroke-dasharray: 2,2;\n}\n\n.link .to-null {\n  stroke-opacity: .5;\n  stroke-dasharray: .5,3.5;\n  stroke-linecap: round;\n}\n\n.play circle {\n  fill: #fff;\n  stroke: #000;\n  stroke-width: 3px;\n}\n\n.play:hover path {\n  fill: red;\n}\n\n.play rect {\n  fill: none;\n  pointer-events: all;\n  cursor: pointer;\n}\n\n</style>\n<body>\n<script src=\"//d3js.org/d3.v3.min.js\"></script>\n<script>\n\nvar margin = {top: 0, right: 120, bottom: 0, left: 120},\n    width = 720,\n    step = 100;\n\nfunction tree(leftRoot, rightRoot, outerHeight) {\n  if (arguments.length < 3) outerHeight = rightRoot, rightRoot = null;\n\n  var height = outerHeight - margin.top - margin.bottom;\n\n  var tree = d3.layout.tree()\n      .size([height, 1])\n      .separation(function() { return 1; });\n\n  var svg = d3.select(\"body\").append(\"svg\")\n      .attr(\"width\", width + margin.left + margin.right)\n      .attr(\"height\", height + margin.top + margin.bottom)\n      .style(\"margin-top\", \"58px\");\n\n  var g = svg.selectAll(\"g\")\n      .data([].concat(\n        leftRoot ? {type: \"left\", nodes: tree.nodes(leftRoot)} : [],\n        rightRoot ? {type: \"right\", nodes: tree.nodes(rightRoot).map(flip), flipped: true} : []\n      ))\n    .enter().append(\"g\")\n      .attr(\"class\", function(d) { return d.type; })\n      .attr(\"transform\", function(d) {\n        return \"translate(\" + (!!d.flipped * width + margin.left) + \",\" + margin.top + \")\";\n      });\n\n  var node = g.append(\"g\")\n      .attr(\"class\", \"node\")\n    .selectAll(\"g\")\n      .data(function(d) { return d.nodes; })\n    .enter().append(\"g\")\n      .attr(\"class\", function(d) { return d.type; })\n      .attr(\"transform\", function(d) { return \"translate(\" + d.depth * step + \",\" + d.x + \")\"; })\n\n  node.append(\"text\")\n      .attr(\"x\", function(d) { return d.flipped ? -6 : 6; })\n      .attr(\"dy\", \".35em\")\n      .text(function(d) { return d.name; })\n      .each(function(d) { d.width = Math.max(32, this.getComputedTextLength() + 12); });\n\n  node.filter(function(d) { return \"join\" in d; }).insert(\"path\", \"text\")\n      .attr(\"class\", \"join\")\n      .attr(\"d\", d3.svg.diagonal()\n        .source(function(d) { return {y: d.width, x: 0}; })\n        .target(function(d) { return {y: 88, x: d.join * 24}; })\n        .projection(function(d) { return [d.y, d.x]; }));\n\n  node.insert(\"rect\", \"text\")\n      .attr(\"ry\", 6)\n      .attr(\"rx\", 6)\n      .attr(\"y\", -10)\n      .attr(\"height\", 20)\n      .attr(\"width\", function(d) { return d.width; })\n    .filter(function(d) { return d.flipped; })\n      .attr(\"x\", function(d) { return -d.width; });\n\n  var link = g.insert(\"g\", \".node\")\n      .attr(\"class\", \"link\")\n    .selectAll(\"path\")\n      .data(function(d) { return tree.links(d.nodes); })\n    .enter().append(\"path\")\n      .attr(\"class\", function(d) { return \"to-\" + d.target.type + \" from-\" + d.source.type; })\n      .attr(\"d\", d3.svg.diagonal()\n        .source(function(d) { return {y: d.source.depth * step + (d.source.flipped ? -1 : +1) * d.source.width, x: d.source.x}; })\n        .target(function(d) { return {y: d.target.depth * step, x: d.target.x}; })\n        .projection(function(d) { return [d.y, d.x]; }));\n\n  function flip(d) {\n    d.depth *= -1;\n    d.flipped = true;\n    return d;\n  }\n\n  return svg;\n}\n\nfunction treeAnimation(startRoot, startHeight, endRoot, endHeight) {\n  var end = tree(endRoot, endHeight).remove(),\n      height = +end.attr(\"height\"),\n      start = tree(startRoot, startHeight).attr(\"height\", height),\n      svg = start.node(),\n      offset = (endHeight - startHeight) / 2,\n      transform = \"translate(\" + margin.left + \",\" + offset + \")\";\n\n  var play = start.append(\"g\")\n      .attr(\"class\", \"play\");\n\n  play.append(\"circle\")\n      .attr(\"r\", 45)\n      .attr(\"transform\", \"translate(\" + (margin.left + width / 2) + \",\" + height / 2 + \")\");\n\n  play.append(\"path\")\n      .attr(\"d\", \"M-22,-30l60,30l-60,30z\")\n      .attr(\"transform\", \"translate(\" + (margin.left + width / 2) + \",\" + height / 2 + \")scale(.7)\");\n\n  play.append(\"rect\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .on(\"click\", function() { resetAll(); transition1(); });\n\n  end = d3.select(svg.appendChild(end.node().firstChild));\n  start = d3.select(svg.firstChild).attr(\"transform\", transform);\n  end.selectAll(\".array\").each(function() { this.parentNode.appendChild(this); }); // mask elements\n\n  var startNodes = start.datum().nodes,\n      startElements = startNodes.filter(function(d) { return d.type === \"element\"; }),\n      endNodes = end.datum().nodes,\n      endGroups = endNodes.filter(function(d) { return d.type === \"array\"; });\n\n  resetAll();\n\n  function resetAll() {\n    start.call(reset).style(\"display\", null);\n    end.call(reset).style(\"display\", \"none\");\n    play.style(\"display\", null);\n  }\n\n  function reset(svg) {\n    svg.selectAll(\".node g,.link\")\n        .style(\"stroke-opacity\", null)\n        .style(\"fill-opacity\", null);\n\n    start.selectAll(\".array\")\n        .attr(\"class\", function(d) { return d.type; })\n        .attr(\"transform\", function(d, i) { return \"translate(\" + d.depth * step + \",\" + d.x + \")\"; })\n      .select(\"rect\")\n        .attr(\"width\", function(d) { return d.width; });\n  }\n\n  function transition1() {\n    play.style(\"display\", \"none\");\n\n    var t = start.transition()\n        .duration(1000 + (startElements.length - 1) * 50)\n        .each(\"end\", transition2);\n\n    t.selectAll(\".selection,.array,.link\")\n        .duration(0)\n        .style(\"stroke-opacity\", 0)\n        .style(\"fill-opacity\", 0);\n\n    t.selectAll(\".element\")\n        .duration(500)\n        .delay(function(d, i) { return 500 + i * 50; })\n        .attr(\"transform\", function(d, i) { return \"translate(\" + (d.depth - 1) * step + \",\" + (endGroups[i].x - offset) + \")\"; })\n        .attr(\"class\", \"array\")\n      .select(\"rect\")\n        .attr(\"width\", function(d, i) { return endGroups[i].width; });\n  }\n\n  function transition2() {\n    end.style(\"display\", null)\n      .selectAll(\".element,.to-element\")\n        .style(\"display\", \"none\");\n\n    end.selectAll(\".selection,.to-array,.array\")\n        .style(\"stroke-opacity\", 0)\n        .style(\"fill-opacity\", 0)\n      .transition()\n        .duration(0)\n        .style(\"stroke-opacity\", 1)\n        .style(\"fill-opacity\", 1);\n\n    end.transition()\n        .duration(500)\n        .each(\"end\", transition3);\n  }\n\n  function transition3() {\n    start.style(\"display\", \"none\");\n\n    end.selectAll(\".element\")\n        .style(\"display\", null)\n        .attr(\"transform\", function(d) { return \"translate(\" + d.parent.depth * step + \",\" + d.parent.x + \")\"; })\n      .transition()\n        .duration(500)\n        .delay(function(d, i) { return i * 50; })\n        .attr(\"transform\", function(d) { return \"translate(\" + d.depth * step + \",\" + d.x + \")\"; });\n\n    end.selectAll(\".to-element\")\n        .style(\"display\", null)\n        .attr(\"d\", d3.svg.diagonal()\n          .source(function(d) { return {y: d.source.depth * step + d.source.width, x: d.source.x}; })\n          .target(function(d, i) { return {y: d.source.depth * step + d.source.width, x: d.source.x}; })\n          .projection(function(d) { return [d.y, d.x]; }))\n      .transition()\n        .duration(500)\n        .delay(function(d, i) { return i * 50; })\n        .attr(\"d\", d3.svg.diagonal()\n          .source(function(d) { return {y: d.source.depth * step + d.source.width, x: d.source.x}; })\n          .target(function(d, i) { return {y: d.target.depth * step, x: d.target.x}; })\n          .projection(function(d) { return [d.y, d.x]; }));\n\n    end.transition()\n        .duration(5000)\n        .each(\"end\", resetAll);\n  }\n}\n\ntreeAnimation(\n  {type: \"selection\", name: \"selection\", children: [\n    {type: \"array\", name: \"group₀\", children: [\n      {type: \"element\", name: \"tr₀\"},\n      {type: \"element\", name: \"tr₁\"},\n      {type: \"element\", name: \"tr₂\"},\n      {type: \"element\", name: \"tr₃\"}\n    ]}\n  ]},\n  24 * 4,\n  {type: \"selection\", name: \"selection\", children: [\n    {type: \"array\", name: \"group₀\", children: [\n      {type: \"element\", name: \"td₀\"},\n      {type: \"element\", name: \"td₁\"},\n      {type: \"element\", name: \"td₂\"},\n      {type: \"element\", name: \"td₃\"}\n    ]},\n    {type: \"array\", name: \"group₁\", children: [\n      {type: \"element\", name: \"td₄\"},\n      {type: \"element\", name: \"td₅\"},\n      {type: \"element\", name: \"td₆\"},\n      {type: \"element\", name: \"td₇\"}\n    ]},\n    {type: \"array\", name: \"group₂\", children: [\n      {type: \"element\", name: \"td₈\"},\n      {type: \"element\", name: \"td₉\"},\n      {type: \"element\", name: \"td₁₀\"},\n      {type: \"element\", name: \"td₁₁\"}\n    ]},\n    {type: \"array\", name: \"group₃\", children: [\n      {type: \"element\", name: \"td₁₂\"},\n      {type: \"element\", name: \"td₁₃\"},\n      {type: \"element\", name: \"td₁₄\"},\n      {type: \"element\", name: \"td₁₅\"}\n    ]}\n  ]},\n  24 * 16\n);\n\n</script>\n","encoding":"utf-8"},"thumbnail.png":{"filename":"thumbnail.png","type":"image/png","language":null,"raw_url":"https://gist.githubusercontent.com/mbostock/5369146/raw/1226e86424e09f49cf582b6fb9e96852b7c0cd70/thumbnail.png","size":5907,"truncated":false,"content":"iVBORw0KGgoAAAANSUhEUgAAAOYAAAB4CAIAAABpZBnfAAAL42lDQ1BpY20A\nAEjHlZcHVFNJF4DnlRRCEkogAlJC70iRLr0LCtLBRkhCEkoMgaBiL4sKrAUV\nUazoCoiC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JjzptTU9MtLVHXZfLA1+WQe2YN\nDAx0d3cvOpCmusSvPZDm3XffhQNplq8J57JVtYcrHjt2jHNxYSZDNE84HHIc\nxzAMOFxRRc2cbC15ULimaQgJzgWCg8KVdbskexPAn964OSDZGwz+wFGjQbJA\nMTC1AoqBZIFiIFmgGEgWKAaSBYqBZIFiIFmgGEgWKAaSBYqBZIFiIFmgGEgW\nKAaSBYqBZIFiIFmgGEgWKAaSBYqBZIFiIFmgGEgWKAaSBYqBZIFiIFmgGEgW\nKAaSBYqBZIFiIFmgGEgWKAaSBYqBZIFiIFmgGEgWKAaSBYqBZIFiIFmgGEgW\nKAaSBYqBZIFiIFmgGEgWKAaSBYqBZIFiIFmgGEgWKAaSBYr5PxjXwUkjKTRD\nAAAAAElFTkSuQmCC\n","encoding":"base64"}},"public":true,"created_at":"2013-04-12T03:37:20Z","updated_at":"2016-02-09T02:06:51Z","description":"How selectAll Works","comments":0,"user":null,"comments_enabled":true,"comments_url":"https://api.github.com/gists/5369146/comments","owner":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"forks":[],"history":[{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"5c073be11f2354b8687638aacd8a1870398831d6","committed_at":"2016-02-09T02:06:49Z","change_status":{"total":1,"additions":1,"deletions":0},"url":"https://api.github.com/gists/5369146/5c073be11f2354b8687638aacd8a1870398831d6"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"274b11b57a8fc71433c9aab499751b1cf78fb08d","committed_at":"2015-10-31T01:39:23Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/5369146/274b11b57a8fc71433c9aab499751b1cf78fb08d"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"4f6901ed7ad534d0344a5b4620cd0853331670b0","committed_at":"2015-06-11T19:24:28Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/5369146/4f6901ed7ad534d0344a5b4620cd0853331670b0"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"84cce6f4959acba9035a778fc81d5fb1256d8cf5","committed_at":"2013-04-12T15:06:31Z","change_status":{"total":50,"additions":8,"deletions":42},"url":"https://api.github.com/gists/5369146/84cce6f4959acba9035a778fc81d5fb1256d8cf5"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"7edcfc65c2775a4c69cb50e02fc14a641aaf0c54","committed_at":"2013-04-12T04:29:12Z","change_status":{"total":0,"additions":0,"deletions":0},"url":"https://api.github.com/gists/5369146/7edcfc65c2775a4c69cb50e02fc14a641aaf0c54"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"5b08dc980a27f11ab78bee7dd3122f17014092e9","committed_at":"2013-04-12T03:54:44Z","change_status":{"total":6,"additions":3,"deletions":3},"url":"https://api.github.com/gists/5369146/5b08dc980a27f11ab78bee7dd3122f17014092e9"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"8714bf4ed94ddc4de29a5736d1ef704f27d53bba","committed_at":"2013-04-12T03:37:20Z","change_status":{"total":401,"additions":401,"deletions":0},"url":"https://api.github.com/gists/5369146/8714bf4ed94ddc4de29a5736d1ef704f27d53bba"}],"truncated":false}