{"url":"https://api.github.com/gists/6123708","forks_url":"https://api.github.com/gists/6123708/forks","commits_url":"https://api.github.com/gists/6123708/commits","id":"6123708","node_id":"MDQ6R2lzdDYxMjM3MDg=","git_pull_url":"https://gist.github.com/6123708.git","git_push_url":"https://gist.github.com/6123708.git","html_url":"https://gist.github.com/mbostock/6123708","files":{".block":{"filename":".block","type":"text/plain","language":null,"raw_url":"https://gist.githubusercontent.com/mbostock/6123708/raw/248b2aa1ad8847e4ea3958f78263e9222cb31bdc/.block","size":66,"truncated":false,"content":"license: gpl-3.0\nredirect: https://observablehq.com/@d3/drag-zoom\n","encoding":"utf-8"},"README.md":{"filename":"README.md","type":"text/markdown","language":"Markdown","raw_url":"https://gist.githubusercontent.com/mbostock/6123708/raw/ef710315911300e4e935e09134ac82a74e7dd234/README.md","size":1073,"truncated":false,"content":"An example of how to combine [d3.behavior.drag](https://github.com/mbostock/d3/wiki/Drag-Behavior) and [d3.behavior.zoom](https://github.com/mbostock/d3/wiki/Zoom-Behavior), using `stopPropagation` to allow the drag behavior to take precedence over panning. Use the mouse to pan by clicking on the background, or drag by clicking on individual dots; you may also use the mousewheel to zoom.\n\nNote: combining these two behaviors means that gesture interpretation is ambiguous and highly sensitive to position. A click on a circle is interpreted as dragging that circle, whereas a click one pixel away could be interpreted as panning the background. A more robust method of combining these behaviors is to employ modality. For example, if the user holds down the SPACE key, clicking and dragging is interpreted as panning, rather than dragging, regardless of the click location. This approach is commonly employed in commercial software such as Adobe Photoshop.\n\nThis example was created in response to a [Stack Overflow question](http://stackoverflow.com/a/17976205/365814).","encoding":"utf-8"},"dots.tsv":{"filename":"dots.tsv","type":"text/tab-separated-values","language":"TSV","raw_url":"https://gist.githubusercontent.com/mbostock/6123708/raw/144d056ba9a79fba8cd4235b959c8bde67f3d3fc/dots.tsv","size":76,"truncated":false,"content":"x\ty\n100\t80\n80\t69\n130\t75\n90\t88\n110\t83\n140\t99\n60\t72\n40\t42\n120\t108\n70\t48\n50\t56\n","encoding":"utf-8"},"index.html":{"filename":"index.html","type":"text/html","language":"HTML","raw_url":"https://gist.githubusercontent.com/mbostock/6123708/raw/16d36fe0e28dfc54cc655dbfdff4003d4f6639fd/index.html","size":2555,"truncated":false,"content":"<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n\n.dot circle {\n  fill: lightsteelblue;\n  stroke: steelblue;\n  stroke-width: 1.5px;\n}\n\n.dot circle.dragging {\n  fill: red;\n  stroke: brown;\n}\n\n.axis line {\n  fill: none;\n  stroke: #ddd;\n  shape-rendering: crispEdges;\n  vector-effect: non-scaling-stroke;\n}\n\n</style>\n<body>\n<script src=\"//d3js.org/d3.v3.min.js\"></script>\n<script>\n\nvar margin = {top: -5, right: -5, bottom: -5, left: -5},\n    width = 960 - margin.left - margin.right,\n    height = 500 - margin.top - margin.bottom;\n\nvar zoom = d3.behavior.zoom()\n    .scaleExtent([1, 10])\n    .on(\"zoom\", zoomed);\n\nvar drag = d3.behavior.drag()\n    .origin(function(d) { return d; })\n    .on(\"dragstart\", dragstarted)\n    .on(\"drag\", dragged)\n    .on(\"dragend\", dragended);\n\nvar svg = d3.select(\"body\").append(\"svg\")\n    .attr(\"width\", width + margin.left + margin.right)\n    .attr(\"height\", height + margin.top + margin.bottom)\n  .append(\"g\")\n    .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.right + \")\")\n    .call(zoom);\n\nvar rect = svg.append(\"rect\")\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .style(\"fill\", \"none\")\n    .style(\"pointer-events\", \"all\");\n\nvar container = svg.append(\"g\");\n\ncontainer.append(\"g\")\n    .attr(\"class\", \"x axis\")\n  .selectAll(\"line\")\n    .data(d3.range(0, width, 10))\n  .enter().append(\"line\")\n    .attr(\"x1\", function(d) { return d; })\n    .attr(\"y1\", 0)\n    .attr(\"x2\", function(d) { return d; })\n    .attr(\"y2\", height);\n\ncontainer.append(\"g\")\n    .attr(\"class\", \"y axis\")\n  .selectAll(\"line\")\n    .data(d3.range(0, height, 10))\n  .enter().append(\"line\")\n    .attr(\"x1\", 0)\n    .attr(\"y1\", function(d) { return d; })\n    .attr(\"x2\", width)\n    .attr(\"y2\", function(d) { return d; });\n\nd3.tsv(\"dots.tsv\", dottype, function(error, dots) {\n  dot = container.append(\"g\")\n      .attr(\"class\", \"dot\")\n    .selectAll(\"circle\")\n      .data(dots)\n    .enter().append(\"circle\")\n      .attr(\"r\", 5)\n      .attr(\"cx\", function(d) { return d.x; })\n      .attr(\"cy\", function(d) { return d.y; })\n      .call(drag);\n});\n\nfunction dottype(d) {\n  d.x = +d.x;\n  d.y = +d.y;\n  return d;\n}\n\nfunction zoomed() {\n  container.attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\n}\n\nfunction dragstarted(d) {\n  d3.event.sourceEvent.stopPropagation();\n  d3.select(this).classed(\"dragging\", true);\n}\n\nfunction dragged(d) {\n  d3.select(this).attr(\"cx\", d.x = d3.event.x).attr(\"cy\", d.y = d3.event.y);\n}\n\nfunction dragended(d) {\n  d3.select(this).classed(\"dragging\", false);\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/6123708/raw/79f267e13a06c284eba3daa0f81a59a0e731d04a/thumbnail.png","size":5981,"truncated":false,"content":"iVBORw0KGgoAAAANSUhEUgAAAOYAAAB4CAIAAABpZBnfAAAKhGlDQ1BpY20A\nAEjHlZYHUFPpFse/e9MbLSF0CL33DtJrKNKrjZCEEEoIgSAiIiriCq4FEREs\nC7rSFFyVImtBRLGwCCjYXZBFRV0XCzZU3kUe8b15s/Nmz8yZ+5szZ/7f+cqd\n+QNArmQJhWmwDADpgmxRuJ8nIzYunoF7ALCADPCADsxY7CyhR2hoEPjbeDcC\noLnvDdM5LfDPQpbDzWIDAIUinMjJYqcjfBLJQrZQlA0Aygap66zMFs5xLMI0\nETIgwnPr0HjzXDjHifNc/q0nMtwL4XoA8GQWS8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PY\nggV2DIAdg9iCZceAHYPIgmXHgB2DyIJlx4Adg5iCBXYMQqa2a2DHYPyCBXYM\nkB2DeIJV7Bg4dgwiDJYdA3YMIguWHQN2DCILlh0DdgyiCXabcUHDRnNcCmfH\nYGyCRXYMHDsGsQUL7BgAOwaxBcuOATsGkQXLjgE7BpEFy44BOwYxBQvsGIRM\nbdfAjsH4BQvsGCA7BvEEq9gxcOwYRBgsOwbsGEQWLDsG7BhEFiw7BuwYRBPs\nNuOCho3muBTOjsHYBIvsGDh2DGILFtgxAHYMYguWHQN2DCILlh0DdgwiC5Yd\nA3YMYgoW2DEImdqugR2D8QsWAP4L+E4lt8l6ib0AAAAASUVORK5CYII=\n","encoding":"base64"}},"public":true,"created_at":"2013-07-31T16:36:23Z","updated_at":"2023-10-24T08:48:34Z","description":"Drag + Zoom","comments":0,"user":null,"comments_enabled":true,"comments_url":"https://api.github.com/gists/6123708/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":[{"url":"https://api.github.com/gists/9110896","user":{"login":"ff6347","id":315106,"node_id":"MDQ6VXNlcjMxNTEwNg==","avatar_url":"https://avatars.githubusercontent.com/u/315106?v=4","gravatar_id":"","url":"https://api.github.com/users/ff6347","html_url":"https://github.com/ff6347","followers_url":"https://api.github.com/users/ff6347/followers","following_url":"https://api.github.com/users/ff6347/following{/other_user}","gists_url":"https://api.github.com/users/ff6347/gists{/gist_id}","starred_url":"https://api.github.com/users/ff6347/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ff6347/subscriptions","organizations_url":"https://api.github.com/users/ff6347/orgs","repos_url":"https://api.github.com/users/ff6347/repos","events_url":"https://api.github.com/users/ff6347/events{/privacy}","received_events_url":"https://api.github.com/users/ff6347/received_events","type":"User","user_view_type":"public","site_admin":false,"name":"Fabian Morón Zirfas","company":"@fh-potsdam","blog":"https://fabianmoronzirfas.me","location":"Berlin","email":null,"hireable":true,"bio":"👋🏽  I'm Fabian. I'm a creative technologist, educator and master student @fh-potsdam living in Berlin who occasionally does stuff that involves things.","twitter_username":"fmoronzirfas","public_repos":536,"public_gists":489,"followers":462,"following":652,"created_at":"2010-06-26T09:38:16Z","updated_at":"2026-02-27T10:25:07Z"},"id":"9110896","created_at":"2014-02-20T10:34:47Z","updated_at":"2015-08-29T13:56:34Z"},{"url":"https://api.github.com/gists/871b7c781b92fd0044f5","user":{"login":"bollwyvl","id":45380,"node_id":"MDQ6VXNlcjQ1Mzgw","avatar_url":"https://avatars.githubusercontent.com/u/45380?v=4","gravatar_id":"","url":"https://api.github.com/users/bollwyvl","html_url":"https://github.com/bollwyvl","followers_url":"https://api.github.com/users/bollwyvl/followers","following_url":"https://api.github.com/users/bollwyvl/following{/other_user}","gists_url":"https://api.github.com/users/bollwyvl/gists{/gist_id}","starred_url":"https://api.github.com/users/bollwyvl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bollwyvl/subscriptions","organizations_url":"https://api.github.com/users/bollwyvl/orgs","repos_url":"https://api.github.com/users/bollwyvl/repos","events_url":"https://api.github.com/users/bollwyvl/events{/privacy}","received_events_url":"https://api.github.com/users/bollwyvl/received_events","type":"User","user_view_type":"public","site_admin":false,"name":"Nicholas Bollweg","company":null,"blog":"","location":"MN, USA","email":null,"hireable":null,"bio":null,"twitter_username":null,"public_repos":1077,"public_gists":244,"followers":246,"following":3,"created_at":"2009-01-09T18:01:57Z","updated_at":"2026-03-13T02:24:44Z"},"id":"871b7c781b92fd0044f5","created_at":"2014-08-07T14:34:20Z","updated_at":"2015-08-29T14:05:00Z"},{"url":"https://api.github.com/gists/5239629439add508a136","user":{"login":"hlucasfranca","id":11790275,"node_id":"MDQ6VXNlcjExNzkwMjc1","avatar_url":"https://avatars.githubusercontent.com/u/11790275?v=4","gravatar_id":"","url":"https://api.github.com/users/hlucasfranca","html_url":"https://github.com/hlucasfranca","followers_url":"https://api.github.com/users/hlucasfranca/followers","following_url":"https://api.github.com/users/hlucasfranca/following{/other_user}","gists_url":"https://api.github.com/users/hlucasfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/hlucasfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlucasfranca/subscriptions","organizations_url":"https://api.github.com/users/hlucasfranca/orgs","repos_url":"https://api.github.com/users/hlucasfranca/repos","events_url":"https://api.github.com/users/hlucasfranca/events{/privacy}","received_events_url":"https://api.github.com/users/hlucasfranca/received_events","type":"User","user_view_type":"public","site_admin":false,"name":"Henrique Lucas França","company":null,"blog":"https://www.linkedin.com/in/hlucasfranca/","location":"São Paulo - Brazil","email":null,"hireable":null,"bio":null,"twitter_username":null,"public_repos":43,"public_gists":52,"followers":58,"following":59,"created_at":"2015-04-03T20:30:38Z","updated_at":"2026-03-04T10:55:41Z"},"id":"5239629439add508a136","created_at":"2015-07-23T07:31:21Z","updated_at":"2015-08-29T14:25:40Z"},{"url":"https://api.github.com/gists/5e78724d23b99bda5c46efc27baf0d8c","user":{"login":"alex-ketch","id":1646307,"node_id":"MDQ6VXNlcjE2NDYzMDc=","avatar_url":"https://avatars.githubusercontent.com/u/1646307?v=4","gravatar_id":"","url":"https://api.github.com/users/alex-ketch","html_url":"https://github.com/alex-ketch","followers_url":"https://api.github.com/users/alex-ketch/followers","following_url":"https://api.github.com/users/alex-ketch/following{/other_user}","gists_url":"https://api.github.com/users/alex-ketch/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-ketch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-ketch/subscriptions","organizations_url":"https://api.github.com/users/alex-ketch/orgs","repos_url":"https://api.github.com/users/alex-ketch/repos","events_url":"https://api.github.com/users/alex-ketch/events{/privacy}","received_events_url":"https://api.github.com/users/alex-ketch/received_events","type":"User","user_view_type":"public","site_admin":false,"name":"Alex Ketch","company":null,"blog":"https://ketch.co","location":"Montréal, CA","email":null,"hireable":null,"bio":"Freelance designer & full-stack developer","twitter_username":"alex_ketch","public_repos":20,"public_gists":7,"followers":15,"following":5,"created_at":"2012-04-15T22:33:49Z","updated_at":"2026-03-10T22:07:07Z"},"id":"5e78724d23b99bda5c46efc27baf0d8c","created_at":"2018-06-18T19:19:32Z","updated_at":"2018-06-18T20:19:31Z"}],"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":"4532c463e18727465380792e71c43f7636d60fab","committed_at":"2019-08-08T16:01:26Z","change_status":{"total":1,"additions":1,"deletions":0},"url":"https://api.github.com/gists/6123708/4532c463e18727465380792e71c43f7636d60fab"},{"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":"65e97764621a5b3ea75acf1cd66b60d8d76bae7e","committed_at":"2016-02-09T02:02:56Z","change_status":{"total":1,"additions":1,"deletions":0},"url":"https://api.github.com/gists/6123708/65e97764621a5b3ea75acf1cd66b60d8d76bae7e"},{"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":"0aa22322fe72f495b1fa15433dc327a2390d59c6","committed_at":"2015-10-31T01:50:43Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/6123708/0aa22322fe72f495b1fa15433dc327a2390d59c6"},{"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":"60f8a0525eac9b654bfb9cbd74f8eac25c53454a","committed_at":"2015-06-11T19:18:39Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/6123708/60f8a0525eac9b654bfb9cbd74f8eac25c53454a"},{"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":"11fbee1d4c552a9739bb16755b184b68503fe35f","committed_at":"2013-07-31T18:11:01Z","change_status":{"total":15,"additions":13,"deletions":2},"url":"https://api.github.com/gists/6123708/11fbee1d4c552a9739bb16755b184b68503fe35f"},{"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":"d737e80e345e3f148c82037ed2fe30dba0776697","committed_at":"2013-07-31T18:09:49Z","change_status":{"total":2,"additions":2,"deletions":0},"url":"https://api.github.com/gists/6123708/d737e80e345e3f148c82037ed2fe30dba0776697"},{"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":"ac6dffb408f500f57bac1ee59f34c82729d60d7d","committed_at":"2013-07-31T16:48:10Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/6123708/ac6dffb408f500f57bac1ee59f34c82729d60d7d"},{"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":"8af0aa1d221dbd0006683568b2b5be4cbfbcfe65","committed_at":"2013-07-31T16:44:52Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/6123708/8af0aa1d221dbd0006683568b2b5be4cbfbcfe65"},{"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":"7b00c13b00ddf595906a22456993967f6182b718","committed_at":"2013-07-31T16:44:23Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/6123708/7b00c13b00ddf595906a22456993967f6182b718"},{"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":"d8f03c389a9ee09ce87b986ccd16f45246d0caa2","committed_at":"2013-07-31T16:41:35Z","change_status":{"total":4,"additions":3,"deletions":1},"url":"https://api.github.com/gists/6123708/d8f03c389a9ee09ce87b986ccd16f45246d0caa2"},{"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":"d65479d72992eb9ed2ae4e0703b1ef98f5331f38","committed_at":"2013-07-31T16:37:12Z","change_status":{},"url":"https://api.github.com/gists/6123708/d65479d72992eb9ed2ae4e0703b1ef98f5331f38"},{"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":"e6d5e9bc59c6857eeed580dfa6a36639ed314dce","committed_at":"2013-07-31T16:36:23Z","change_status":{},"url":"https://api.github.com/gists/6123708/e6d5e9bc59c6857eeed580dfa6a36639ed314dce"}],"truncated":false}