Last active
April 21, 2016 21:48
-
-
Save acatejr/2b4fa88dfb632dc67d56d71c6d062272 to your computer and use it in GitHub Desktop.
D3.js Code Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to group data | |
var map = d3.nest() | |
.key(function(d) { return d.attribute; }) | |
.rollup(function(v) { | |
return { | |
count: v.length | |
}; | |
}) | |
.map(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment