anchor.diff: -<%#= link_to "clear bubbles", "/clearbev", :method => :post %>
  -<%= button_to "Clear Bubbles", clearbev_path, :class => "clearbev", :remote => true, :method => :delete %>
  -<%= button_to "Refresh Bubbles", beverage_path, :method => :get %>
  -
   <script src="http://d3js.org/d3.v3.min.js"></script>
   <style>
   
  
positive.code: function getNewTweets(){
      d3.json("beverage.json?after=", function(error, root) {
        console.log(root);
        var total = 0;
        root["children"].forEach(function(child) {  total = total + child.size });
        console.log("Total is "+ total);
        root["children"].map( function(item) {
          // console.log(item['name'],item['size']);
          // $('g#' + item['name']).attr('transform', function(d) { return "translate(" + d.x + "," + d.y + ")"; });
          // $('circle#' + item['name']).attr('r', item["size"]);
          // transitionNodes();
          // console.log("Percentage for " + item['name'] +" is " + (((item["size"])/total)*100).toFixed(2) + "%");
          $('circle#' + item['name']).attr('r', function(d) { return d.r } );
          console.log((item["size"])/total);
          console.log()
        })
      });
    setTimeout(getNewTweets,1000);  
  }
  
negative.code: //   console.log(child);
  // }
  
  // // Returns a flattened hierarchy containing all leaf nodes under the root.
  // function classes(root) {
  //   var classes = [];
  
  //   function recurse(name, node) {
  //     if (node.children) node.children.forEach(function(child) { recurse(node.name, child); });
  //     else classes.push({packageName: name, className: node.name, value: node.size});
  //   }
  
  //   recurse(null, root);
  //   return {children: classes};
  // }
  
  // d3.select(self.frameElement).style("height", diameter + "px");
  
  // end d3
  
  