Reputation: 31
Does anyone know a javascript library that can replicate NYTimes GREAT swing state visualisation:
http://www.nytimes.com/interactive/2012/10/15/us/politics/swing-history.html?ref=politics
Upvotes: 3
Views: 769
Reputation: 6719
Sankey diagrams might be your best bet. They show how values split and recombine over the stages of a process. I just used the d3 library for a visualization of Senate nominations. (In this case, the output was converted form d3 to Raphael for final product.)
You just need to arrange data as a series of nodes and links, though any circular links will fool the algorithm.
Upvotes: 1
Reputation: 6322
Yes. Since Michael Bostock (creator of d3) now works at NY Times, I'm assuming you're going to want to use d3. There's an examples page on the GitHub repo. ;-)
https://github.com/mbostock/d3/wiki
Here's the gallery page:
https://github.com/mbostock/d3/wiki/Gallery
Upvotes: 2