Kevin Bluer
From this...
to this :)
JavaScript library for exploring large multivariate datasets in the browser. D3 for all the visualization.
Alternative for coloring arbitrary ranges.
Includes markers on cities.
Example of interactivity
Uses HTML5 Canvas (as opposed to SVG)
Taken from the D3 playground...
// Array of objects (each containing a title and an array of values)
// This of course could be loaded remotely and in a variety of formats
[
{title:"Good Stock",values:[10,20,30,40,50]},
{title:"Bad Stock",values:[40,20,1,35,12]},
{title:"Bostock",values:[1,1,2,3,5,8,13,21,34,55,89]}
]
#playground { text-align:center }
article { display:inline-block; margin:1em 2em; position:relative }
article h2 {
margin:0; padding:0;
position:absolute; width:100%; top:100%;
font-size:100%
}
.bar {
display: inline-block;
width: 15px;
background: #369; color:white;
border:3px outset #69c;
border-bottom:1px solid #000;
border-radius:2px 2px 0 0;
}
/* 1. select the element to which we want to attach the visualization */
/* 2. and bind the data (note that selectAll will create the elements) */
var a = d3.select('#playground').selectAll('article').data($data);
/* 3. enter() will create the elements returned from the selectAll */
/* because they didn't yet exist it will create them */
a.enter().append('article').append('h2').text(function('title'));
/* notice the chaining syntax that is used */
/* 1. same principal as above, this time for the bars in the graph */
/* 2. the data being bound is the values in the array */
var bars = a.selectAll('div.bar').data(function('values'));
bars.enter().append('div').attr('class','bar');
/* 3. adjust the height of the bars as appropriate */
bars.style('height',pxScale(2));
/* 4. the func used to scale the bars by a factor of 2 */
function pxScale(factor){
return function(d){ return d*factor+'px' }
}
And please reach out at [email protected] ...