Skip to content

Instantly share code, notes, and snippets.

@nkhine
nkhine / demo.js
Created July 9, 2012 11:59 — forked from syntagmatic/demo.js
Projection Demo
// demo.js
//
// Adapted by Kai Chang and Rich Morin from http://bl.ocks.org/1653763
window.onload = function() {
var w = $('#chart').width(),
h = (w * 0.45);
proj = {
@nkhine
nkhine / README.md
Created July 10, 2012 07:16 — forked from mbostock/.block
Superformula Tweening (Christophe Viau)

Christophe Viau implemented a new shape type for D3.js based on superformulas. One nice property of these shapes is that you can easily tween between two shapes by simply interpolating the control points. Click on the blue shapes to try it!

@nkhine
nkhine / debt.csv
Created July 10, 2012 10:34 — forked from mbostock/.block
The Euro Debt Crisis
creditor debtor amount risk
Britain France 22.4 3
Britain Greece 0.55 0
Britain Italy 26 0
Britain Portugal 19.4 0
Britain United States 345 1
France Germany 53.8 1
France Greece 53.9 0
France Ireland 17.3 0
France Italy 366 0
@nkhine
nkhine / index.html
Created July 10, 2012 11:54 — forked from eugenepyvovarov/index.html
Google Maps + D3
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="http://github.com/mbostock/d3/raw/v1.8.4/d3.js"></script>
<style type="text/css">
html, body, #map {
width: 100%;
@nkhine
nkhine / README.md
Created July 12, 2012 12:36 — forked from mbostock/.block
Twitter SVG Logo
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Creating SVG groups with D3.js</title>
</head>
<body>
<div id="d3group"></div>
<script type="text/javascript">
@nkhine
nkhine / jquery.doubletap.js
Created August 9, 2012 12:23 — forked from asgeo1/jquery.doubletap.js
doubletap event for jquery
//based on blog post that I saw here: http://www.sanraul.com/2010/08/01/implementing-doubletap-on-iphones-and-ipads/
(function($){
$.fn.doubletap = function(fn) {
return fn ? this.bind('doubletap', fn) : this.trigger('doubletap');
};
$.attrFn.doubletap = true;
$.event.special.doubletap = {
setup: function(data, namespaces){
@nkhine
nkhine / fiddle.css
Created September 6, 2012 10:05 — forked from zalun/fiddle.css
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid #999;
}
@nkhine
nkhine / graph.json
Created September 28, 2012 10:52 — forked from jdonaldson/graph.json
Force-Directed Layout (with tipsy labels)
{"nodes":[{"name":"Myriel","group":1},{"name":"Napoleon","group":1},{"name":"Mlle.Baptistine","group":1},{"name":"Mme.Magloire","group":1},{"name":"CountessdeLo","group":1},{"name":"Geborand","group":1},{"name":"Champtercier","group":1},{"name":"Cravatte","group":1},{"name":"Count","group":1},{"name":"OldMan","group":1},{"name":"Labarre","group":2},{"name":"Valjean","group":2},{"name":"Marguerite","group":3},{"name":"Mme.deR","group":2},{"name":"Isabeau","group":2},{"name":"Gervais","group":2},{"name":"Tholomyes","group":3},{"name":"Listolier","group":3},{"name":"Fameuil","group":3},{"name":"Blacheville","group":3},{"name":"Favourite","group":3},{"name":"Dahlia","group":3},{"name":"Zephine","group":3},{"name":"Fantine","group":3},{"name":"Mme.Thenardier","group":4},{"name":"Thenardier","group":4},{"name":"Cosette","group":5},{"name":"Javert","group":4},{"name":"Fauchelevent","group":0},{"name":"Bamatabois","group":2},{"name":"Perpetue","group":3},{"name":"Simplice","group":2},{"name":"Scaufflaire","group":2},
@nkhine
nkhine / index.html
Last active December 17, 2015 21:59 — forked from johan/index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>d3.js Spinny Globe from Mike Bostock's SVG Open 2011 keynote</title>
<script src="http://mbostock.github.com/d3/d3.js"></script>
<script src="http://mbostock.github.com/d3/d3.geo.js"></script>
<style type="text/css">
svg {