data: https://github.com/1wheel/datavizsociety
img gen: https://gist.github.com/1wheel/bcaa860506520cefb711aa4a9f885c12
All public gists https://gist.github.com/1wheel | |
Copyright 2017, Adam Pearce | |
MIT License, http://www.opensource.org/licenses/mit-license.php |
brew install ffmpeg gifsicle imagemagick
.recording.mov
. ffmpeg -i recording.mov -r 24 recording-%03d.png &&
convert recording-001.png palette.gif &&
convert -dither none -remap palette.gif recording-*.png recording-uncompressed.gif &&
This choropleth encodes unemployment rates from 2008 with a quantize scale ranging from 0 to 15%. A threshold scale is a useful alternative for coloring arbitrary ranges.
Is there a way to prevent the two subsequent odd-numbered days at the end of each year from generating adjacent ticks? In this case I would prefer a tick at Dec 29, Dec 31, Jan 2, Jan 4, etc.
By adding transitions, we can more easily follow the elements as they are entered, updated and exited. Separate transitions are defined for each of the three states.
Note that no transition is applied to the merged enter + update selection; this is because it would supersede the transition already scheduled on entering and updating elements. It's possible to schedule concurrent elements by using transition.transition or by setting transition.id
, but it's simpler here to only transition the x-position on update; for entering elements, the x-position is assigned statically.
Want to read more? Try these tutorials:
Created for http://stackoverflow.com/questions/18809020/accessing-properties-of-objects-in-d3-histogram-bins
This chart shows a histogram of an Irwin–Hall distribution. The data is randomly generated. The values are then binned at regular intervals using D3’s histogram layout. The x-axis uses a linear scale, such that the tick values appear between bars; this provides better indication that each bar represents the count of values between its surrounding tick values.
See also this histogram of a log-normal distribution of time durations.
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
.
An example of d3.behavior.zoom and d3.geo.path. By modifying the transform, the browser can rapidly redraw geographic features while panning and zooming, without the overhead of reprojection. This technique can be extended by combining with d3.geo.tile.