From http://bl.ocks.org/mbostock/raw/4090846/us.json, prepped for jsFiddle.
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
var createThumb = function(fileObj, readStream, writeStream) { | |
// Transform the image into a 10x10px thumbnail | |
gm(readStream, fileObj.name()).resize('10', '10').stream().pipe(writeStream); | |
}; | |
var createWeb = function(fileObj, readStream, writeStream) { | |
// Transform the image into a 10x10px thumbnail | |
gm(readStream, fileObj.name()).resize('320', '180').stream().pipe(writeStream); | |
}; | |
var convertToPng = function(fileObj) { | |
return { |
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
BRANCH | SEX | RACE | HISPANIC | O01 | O02 | O03 | O04 | O05 | O06 | O07 | O08 | O09 | O10 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ARMY | MALE | AMI/ALN | HISP | 2 | 0 | 5 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | |
ARMY | MALE | AMI/ALN | NON-HISP | 38 | 41 | 94 | 77 | 28 | 8 | 1 | 0 | 0 | 0 | |
ARMY | MALE | ASIAN | HISP | 0 | 5 | 3 | 4 | 3 | 1 | 0 | 0 | 0 | 0 | |
ARMY | MALE | ASIAN | NON-HISP | 361 | 432 | 1014 | 537 | 197 | 74 | 1 | 1 | 0 | 0 | |
ARMY | MALE | BLACK | HISP | 18 | 8 | 28 | 19 | 9 | 1 | 0 | 0 | 0 | 0 | |
ARMY | MALE | BLACK | NON-HISP | 746 | 781 | 2221 | 1495 | 895 | 363 | 12 | 8 | 3 | 1 | |
ARMY | MALE | MULTI | HISP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
ARMY | MALE | MULTI | NON-HISP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
ARMY | MALE | P/I | HISP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Tweaks to http://bl.ocks.org/mbostock/6232537 that adds data-driven timespans to the widget. This version allows timespans of varying sizes. It also modifies the brushend
listener to log information based on the timespans where the brush's endpoints are located.
This brush snaps to day boundaries. When the user releases the brush, the brush fires a brushend event, allowing a listener to adjust the brush extent. Using the new brush transitions released in D3 3.3, the brush smoothly interpolates from the original extent to the rounded extent. Compare this approach to using immediate snapping while brushing.