Skip to content

Instantly share code, notes, and snippets.

@vlandham
vlandham / README.md
Created January 11, 2013 21:11 — forked from mbostock/.block

Brushing makes more sense for quantitative dimensions. It’s possible to use a brush to select categorical values, as shown here, though I’d recommend using per-value toggles instead. This way, users can pick arbitrary sets of values, rather than being forced to pick contiguous ranges.

@vlandham
vlandham / gist:83f796321374eceef676
Created November 12, 2015 05:56 — forked from zxcvbnm4709/gist:2656197
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@vlandham
vlandham / citysearch.py
Created December 6, 2012 15:02 — forked from MoritzStefaner/citysearch.py
Search where people are moving in Germany
# coding: utf-8
# requires: pattern http://www.clips.ua.ac.be/pages/pattern
from pattern.web import *
import csv
import sys
# yeah I know
reload(sys)
sys.setdefaultencoding("utf-8")
@vlandham
vlandham / README.md
Created December 5, 2012 14:37 — forked from mbostock/.block
Focus+Context via Brushing

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.

@vlandham
vlandham / index.html
Created November 29, 2012 03:01 — forked from mbostock/.block
Satellite Projection
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.graticule {
fill: none;
stroke: #777;
}
.boundary {
@vlandham
vlandham / index.html
Created November 7, 2012 01:22 — forked from mbostock/.block
move letters
<!DOCTYPE html>
<meta charset="utf-8">
<style>
text {
font: bold 100px monospace;
cursor: move;
}
.enter {
@vlandham
vlandham / geodesic.js
Created October 12, 2012 15:50 — forked from mbostock/.block
Geodesic Grid
(function() {
var φ = 1.618033988749895,
ρ = 180 / Math.PI;
var vertices = [
[1,φ,0], [-1,φ,0], [1,-φ,0], [-1,-φ,0],
[0,1,φ], [0,-1,φ], [0,1,-φ], [0,-1,-φ],
[φ,0,1], [-φ,0,1], [φ,0,-1], [-φ,0,-1]
];
@vlandham
vlandham / _.md
Created September 12, 2012 14:34 — forked from enjalot/_.md
just another inlet to tributary
@vlandham
vlandham / _.md
Created September 12, 2012 14:34 — forked from enjalot/_.md
just another inlet to tributary