Skip to content

Instantly share code, notes, and snippets.

Last active April 25, 2017 19:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
d3.unconf 2016, v9
license: mit
First Name Last Name Ticket Type version first favorite
Alan McLean General Admission v1 Scatter plot d3.timer
alanna scott General Admission v3 Bar chart, Line chart
Alastair Dant General Admission v1 Treemap d3.forceSimulation
Alex Macy General Admission v3 Line chart d3.transition
Amit Patel General Admission v1 N/A d3.behavior.zoom
Andrew Wong Invited v3 Radial plot d3.scale
Angela Pablo Invited v2 Scatter plot
Anna Smylie General Admission v3 Bar chart
Anna Vital Invited v2 Tree d3.line
Anuja Verma Scholarship v3 Tree d3.hierarchy
Bo Ericsson General Admission v3 Line chart
Brad Lyon General Admission v2 Chord diagram d3.selectAll
Brent Cohn General Admission v3 Bar plot d3.forceSimulation
Brian Bailey Scholarship v4 Bar chart d3.voronoi
Casey Haber Scholarship v3 Bar chart d3.force
Chris Polis General Admission v3 Time series d3.transition
christophe viau Invited v1 Tooltip d3.axis
Daniel Overstreet General Admission v3 Scatter plot d3.nest
Daniel Wolfe General Admission v3 Map d3.transition
David Richards General Admission v3 Force d3.interpolate
David Schnurr General Admission v3 Charting library d3.voronoi
David Lin General Admission v3 Bar chart
Don McCurdy General Admission v3 Choropleth d3.voronoi
Eric Socolofsky General Admission v3 Map d3.transition
Erik Cunningham General Admission v3 Scatter plot
Erik Hazzard General Admission v1 Radar chart d3.voronoi
Francois Chabbey General Admission v3 Bar chart d3.scale
Marcos Iglesias General Admission v3 Bar chart d3.selectAll
Hourann Bosci General Admission v3 Map, Bubble chart d3.scaleOrdinal
Ian Johnson Invited v1 Bar chart d3.scaleLinear
Ivy Wang General Admission v1 Network graph nest.rollup
James Womack Invited v3 Scatter plot d3.scale
James Wenzel Scholarship v3 Line chart
Jamie Popkin General Admission v2 Map transform
Janine Heiser Invited v3 Bar chart d3.selection
Jay Mahabal General Admission v3 Bar chart d3.scale
Jeff Zerger Invited v2 Map d3.geoProjection
Jeffrey Catania General Admission v2 Line chart d3.voronoi
Jennifer Lee Invited v3 Bar chart d3.transition
Jeremy Wong General Admission v3 Line Chart d3.geoProjection
Jeremy Wildfire General Admission v2 Bar chart d3.scale
Jim Vallandingham General Admission v2 Bubble chart d3.nest
Jing Lu Scholarship v4 Scatter plot d3.brush
John Schulz General Admission v2 Area chart d3.histogram
John Huynh Scholarship v3 Scatter plot d3.transition
Jon Sadka Invited v4 Bar chart d3.transition
Jon Nguyen General Admission v2 Bar chart d3.extent
Jonathan Nesci General Admission v2 Bar chart scale.invert
Kai Chang Invited v1 Chord diagram d3.interpolateMagma
Ken Penn General Admission v3 Bar chart d3.forceSimulation
Kerry Rodden Invited v1 Chord diagram d3.scale
Krist Wongsuphasawat General Admission v3 Scatter plot d3.selection, d3.scale
Kristen Judd General Admission v3 Pie chart d3.transition
Kristin Henry Invited v2 Chloropleth d3.scale
Leland Lee Scholarship v3 Bar chart arcTween
Logan Carter General Admission v4 Pie chart, Donut chart d3.pie
Ludwig Schubert Scholarship v3 Tree projection.fitSize
Marie Swarzenski Scholarship v3 Line chart d3.transition
Mark Vital General Admission v2 Tree d3.line
Matthew Isanuk Invited v4 Scatter plot d3.scale
Mauro Perez Scholarship v3 Sunburst
Micah Stubbs Invited v3 Map d3.request
Michael Freeman General Admission v2 Bar chart d3.pack
Mike Bostock Invited v1 N/A d3.pack
Minwei Xu Scholarship v4 bar chart d3.layout.force
Naoya Kanai Scholarship v3 bar chart d3.scale
Noah Veltman Invited v2 Line chart d3.transition
Patrick Sun General Admission v3 Scatter Plot selection.attr
Paul Rosenzweig General Admission v4 Scatter plot d3.selectAll
Paul Van slembrouck Invited v1 Bar chart d3.scale
Philippe Rivière Invited v3 Map d3.geoProjection
Phillip Mispagel General Admission v4 Donut chart d3.scale, d3.zoom
Ramesh Sampath General Admission v4 Scatter plot d3.scale
Ric Cheng Scholarship v3 Line chart d3.brush
Robert Crocker Invited v3 Bar chart d3.nest
Robert Harris General Admission v2 Force d3.scale
Roger Fischer Invited v3 Map d3.geo
Rumman Chowdhury Invited v3 Line chart d3.voronoi
Saniya Jesupaul Scholarship v3 Scatter plot d3.color
Sara Quigley Invited v2 Circle pack d3.nest
Sara Schnadt General Admission v3 Scatter plot
Sarah Kwak Scholarship v4 Donut chart d3.transition
Seemant Kulleen Invited v3 Donut chart d3.nest
Shan Carter Invited v2 Bubble chart d3.scaleLinear
Shelby Sturgis Invited v3 Scatter plot d3.scale
Shirley Wu Invited v2 Tree d3.forceSimulation
Siu-Mei Man Invited v4 Bar chart d3.voronoi
Susie Lu Invited v2 Bar chart d3.nest
Tarek Rached General Admission v2 Bar chart d3.layout.pack
Tim Hyon Hyon General Admission v3 Parallel coordinates d3.scale
Tony Chu Invited v3 Bubble chart d3.scale
Toshiyuki Hayashi General Admission v3 Network graph selection.enter, selection.exit
Vasco Asturiano General Admission v2 Force
Victor Powell General Admission v4 Scatter plot d3.geo.path
Visnu Pitiyanuvath General Admission v2 Bar chart d3.nest
Xianlin Hu General Admission v3 Force d3.transition
Yukiko Steineman General Admission v3 Bar chart d3.color
Zack DeSario Invited v2 Bar chart selection.enter
<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script type="text/javascript" src=""></script>
body {
/* background-color: #000; */
svg {
width: 2000px;
height: 2000px
var midpoint = -2/3;
var halfSide = Math.sqrt(1 / 3);
var triangle = [
(-halfSide) + ',-1',
(halfSide) + ',-1',
var favoritesScale = d3.scaleLinear()
.range([midpoint - .05, -.85]);
var versionsScale = d3.scaleOrdinal()
.range(_.rangeRight(3, 7));
var firstsScale = d3.scaleOrdinal();
var hexScale = 75;
var hexSize = hexScale * 2 / Math.sqrt(3);
d3.csv('data.csv', data => {
** process data and add them to scales as domain
var attendees =, d => {
return {
name: d['First Name'],
first: d.first.split(', ')[0],
favorite: d.favorite.split(', ')[0],
version: parseInt(d.version.replace('v', '')),
var firsts = _.chain(attendees)
.sortBy(d => -d[1])
var favorites = _.chain(attendees)
var versions = _.chain(attendees)
.sortBy(d => -d[1])
.filter(d => d[1] > 1)
// update colors with number of classes
var colors = chroma.cubehelix()
// .rotations(-1 / firsts.length)
.lightness([0.3, 0.4])
.scale() // convert to chroma.scale
// .correctLightness()
versionsScale.domain(_.range(1, 5));
var maxFavorites = _.max(_.values(favorites));
favoritesScale.domain([1, maxFavorites]);
** draw the hexagons
var svg ='svg').append('g');
var perRow = 5;
var hex = svg.selectAll('.hex')
.classed('hex', true)
.attr('transform', (d, i) => {
var row = Math.floor(i / perRow);
var x = (i % perRow * 3.2 + 1.5) * hexSize;
if (row % 2) {
x += 1.6 * hexSize;
var y = (row * 1.05 + 2) * hexScale;
return 'translate(' + [x, y] + ')scale(' + hexScale + ')';
}).on('mouseover', d => console.log(d));
var triangles = hex.selectAll('triangle')
.data((d, j) => {
return _.times(versionsScale(d.version), i => {
if (!favorites[d.favorite]) debugger
return {
angle: i * 60,
midpoint: favoritesScale(favorites[d.favorite]),
color: firstsScale(d.first),
// color: colors[j],
.classed('triangle', true)
.attr('transform', d => 'rotate(' + d.angle + ')');
.attr('points', triangle.join(' '))
.attr('fill', d => chroma(d.color).darken(2.5));
// .attr('fill', '#fff');
.data(d => _.times(3, i => {
return Object.assign({
subangle: i * 120,
subcolor: chroma(d.color).saturate(1.5).brighten(i),
}, d);
.classed('subtri', true)
.attr('transform', d => 'rotate(' + d.subangle + ' 0 ' + midpoint + ')')
.attr('points', d => {
return [
(-halfSide) + ',-1',
'0,' + d.midpoint,
halfSide + ',-1'
].join(' ');
}).attr('fill', d => d.subcolor);
** put in the text
var textY = svg.node().getBoundingClientRect().bottom;
var textX = svg.node().getBoundingClientRect().right;
var fontSize = 60;
.attr('x', textX - fontSize * .75)
.attr('y', textY - fontSize * .85)
.attr('text-anchor', 'end')
.attr('dy', '.35em')
.attr('font-size', fontSize)
.style('font-family', 'courier')
.text('d3.unconf 2016')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment