Skip to content

Instantly share code, notes, and snippets.

View sivartravis's full-sized avatar

Travis Taylor sivartravis

  • Cambridge, MA
View GitHub Profile
@sivartravis
sivartravis / README.md
Created February 2, 2016 21:41
Small Multiples

This example shows a few interesting techniques with D3:

  • Stock prices in CSV format are loaded asynchronously.
  • Stock prices are nested by symbol.
  • The x-scale is the minimum and maximum across symbols. (Note Google's IPO.)
  • The y-scale is local to each symbol; the domain is set per multiple.
  • Area and line shapes are used to fill and stroke separately.

Two alternative approaches to small multiples include using selection.each to create a scope and binding local scales to each multiple.

@sivartravis
sivartravis / README.md
Created February 2, 2016 21:40
Small Multiples II
@sivartravis
sivartravis / README.md
Created February 2, 2016 17:48
Mortality

This example is a revived piece of old code from February 2014.

It shows causes of death in an interactive set of linked visualizations, a tree navigator and a stacked area chart.

web counter
@sivartravis
sivartravis / README.md
Created February 2, 2016 17:48
Cluster Dendrogram

A dendrogram is a node-link diagram that places leaf nodes of the tree at the same depth. In this example, the classes (leaf nodes) are aligned on the right edge, with the packages (internal nodes) to the left. Data shows the Flare class hierarchy, courtesy Jeff Heer.

Compare to this Cartesian layout.

forked from mbostock's block: Cluster Dendrogram

@sivartravis
sivartravis / README.md
Created February 2, 2016 17:46
Symbol Map

The area of each circle in this symbol map is proportional to the population of the associated state.

forked from mbostock's block: Symbol Map

@sivartravis
sivartravis / README.md
Created February 2, 2016 17:46
D3 Show Reel

The first 15 seconds of the D3 show reel. See full video at http://vimeo.com/29862153. Includes seamless transitions between the following visualization types:

  • lines
  • horizons
  • areas
  • stacked areas
  • streamgraph
  • overlapping areas
  • grouped bars
  • stacked bars
@sivartravis
sivartravis / Makefile
Created February 2, 2016 17:45
Multi-Line Voronoi
GENERATED_FILES = \
unemployment.tsv
.PHONY: all clean
all: $(GENERATED_FILES)
clean:
rm -rf -- $(GENERATED_FILES)
@sivartravis
sivartravis / README.md
Created February 2, 2016 17:45
Pie Multiples with Nesting

An example of multiple pie (donut) charts created with D3. The data is represented as a tabular array of objects; each row in the table is mapped to an arc, and rows are grouped into pie charts using d3.nest.

forked from mbostock's block: Pie Multiples with Nesting

@sivartravis
sivartravis / README.md
Created February 2, 2016 17:45
Stacked Bar Chart
@sivartravis
sivartravis / Makefile
Created February 2, 2016 17:36
Multi-Line Voronoi
GENERATED_FILES = \
unemployment.tsv
.PHONY: all clean
all: $(GENERATED_FILES)
clean:
rm -rf -- $(GENERATED_FILES)