Skip to content

Instantly share code, notes, and snippets.

@larskotthoff
larskotthoff / README.md
Last active August 29, 2015 13:57 — forked from mbostock/.block
Country 1999 2000 2001 2002 2003
France 19 20 30 32 9
UK 15 22 25 20 21
key value date
Group1 37 04/23/12
Group2 12 04/23/12
Group3 46 04/23/12
Group1 32 04/24/12
Group2 19 04/24/12
Group3 42 04/24/12
Group1 45 04/25/12
Group2 16 04/25/12
Group3 44 04/25/12
@larskotthoff
larskotthoff / README.md
Last active August 29, 2015 13:59 — forked from mbostock/.block

The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

Compare to this Cartesian layout.

@larskotthoff
larskotthoff / ca.json
Last active August 29, 2015 13:59 — forked from mbostock/.block
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larskotthoff
larskotthoff / data.tsv
Last active August 29, 2015 13:59 — forked from mbostock/.block
date New York San Francisco Austin
20111001 63.4 62.7 72.2
20111002 58.0 59.9 67.7
20111003 53.3 59.1 69.4
20111004 55.7 58.8 68.0
20111005 64.2 58.7 72.4
20111006 58.8 57.0 77.0
20111007 57.9 56.7 82.3
20111008 61.8 56.8 78.9
20111009 69.3 56.7 68.8
@larskotthoff
larskotthoff / README.md
Last active August 29, 2015 14:00 — forked from mbostock/.block
@larskotthoff
larskotthoff / README.md
Last active August 29, 2015 14:00 — forked from mbostock/.block

Example illustrating zoom and pan with a "rolling" Mercator projection. Drag left-right to rotate projection cylinder, and up-down to translate, clamped by max absolute latitude. Ensures projection always fits properly in viewbox.

@larskotthoff
larskotthoff / README.md
Last active August 29, 2015 14:01 — forked from mbostock/.block

This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.