answer for http://stackoverflow.com/questions/15518095/appending-a-different-number-of-elements-to-each-group
Interactive version http://bl.ocks.org/widged/5203275