Skip to content

Instantly share code, notes, and snippets.

@dgerber
dgerber / README.md
Last active December 23, 2015 21:39 — forked from mbostock/.block
L*a*b* and L*u*v* color spaces

This is Mike Bostock's block 3014589 plus the CIE L*u*v* and XYZ color spaces from this plugin. Both L*a*b* and L*u*v* are intended as "uniform color spaces" -- matching perceptual color difference with euclidean distance. d3.hcl is L*a*b* in cylindrical (Hue-Chroma-Lightness) coordinates.

@dgerber
dgerber / Makefile
Last active May 2, 2017 22:00
Reusable Non-Contiguous Cartogram
swiss-cantons.topo.json: lib/swiss-maps/topojson/swiss-cantons.json
topojson --properties --id-property abbr \
-o $@ \
lib/swiss-maps/topojson/swiss-cantons.json
@dgerber
dgerber / README.md
Created July 5, 2012 13:20
Financial Secrecy Index 2011

The Financial Secrecy Index 2011 is a tool for understanding global financial secrecy, corruption and illicit financial flows. By ranking secrecy jurisdictions according to both their secrecy, and the scale of their activities, it allows a politically neutral ranking of the biggest players.

Non-self-governing jurisdictions according to the FAO geopolitical ontology.

@dgerber
dgerber / index.html
Created June 21, 2012 10:10
PPP exchange rates converter
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/2.8.1/d3.v2.min.js"></script>
<script type="text/javascript" src="ppp.js"></script>
</head>
<body>
<h3>Convert Local Currencies at Purchasing Power Parity</h3>
<div id="textView">
In <span id="year"></span>, one gets the same amount of goods with:
@dgerber
dgerber / README.txt
Created June 4, 2012 12:53
Generic query editor
Préalables::
pip install --requirement=requirements.txt
Démarrage en local::
python server.py