Skip to content

Instantly share code, notes, and snippets.

@jdspersonal
jdspersonal / .gitignore
Last active June 14, 2019 08:14 — forked from susielu/.gitignore
d3-annotation: Thresholds & Annotation Colors
.DS_Store
@jdspersonal
jdspersonal / .block
Last active June 13, 2019 18:46 — forked from lorenzopub/.block
Line area chart with swoopy drag annotations
license: mit
@jdspersonal
jdspersonal / .block
Created October 11, 2016 05:29 — forked from mbostock/.block
Rainbow Treemap
license: gpl-3.0
height: 1060
@jdspersonal
jdspersonal / .block
Last active October 4, 2016 05:51 — forked from domhorvath/.block
D3 v4 - force layout
license: gpl-3.0
@jdspersonal
jdspersonal / .block
Last active September 16, 2016 15:17 — forked from nbremer/.block
Brushable Horizontal Bar Chart - V
height: 540
@jdspersonal
jdspersonal / README.md
Last active October 22, 2015 14:18 — forked from ckuijjer/README.md
United States Postage Rate

An implementation in D3 of Figure 4-42 "Step chart showing change in postage rate" in "Visualize This" by Nathan Yau.

Both the tickFormat function used for the x axis and the function used to render the amounts use a directly executed JavaScript function. This function returns another JavaScript function and creates a closure on the first variable, allowing them to have a specific format for the first option in the dataset.

Issues:

  • The tickmark for 2001 renders as '01 instead of 2001
@jdspersonal
jdspersonal / .gitignore
Last active August 29, 2015 14:13 — forked from mbostock/.block
.DS_Store
build
node_modules
@jdspersonal
jdspersonal / index.html
Last active August 29, 2015 14:11 — forked from emeeks/index.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Orbits 2</title>
<meta charset="utf-8" />
</head>
<style>
#viz, svg {
width: 900px;
height: 900px;
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
fill: #282828 ;
}
.node:hover {
@jdspersonal
jdspersonal / README.md
Last active August 29, 2015 14:06 — forked from mbostock/.block

This map shows the graph distance of each county from the Pacific or Atlantic coast; it is a recreation of a map posted to /r/dataisbeautiful using TopoJSON. Coastal counties are dark blue, while counties nine or more counties away from the coast are light yellow. (I opted not to reuse the original’s cycling color scale.)

See also the underlying graph.