JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>

CSS

text {
  font: 10px sans-serif;
}

JavaScript

var diameter = 700,
    format = d3.format(",d"),
    color = d3.scale.category20c();

var bubble = d3.layout.pack()
    .sort(null)
    .size([diameter, diameter])
    .padding(1.5);

var svg = d3.select("body").append("svg")
    .attr("width", diameter)
    .attr("height", diameter)
    .attr("class", "bubble");



d3.csv("https://data.cityofnewyork.us/resource/25th-nujf.csv?$limit=10000", function (error, root) {
	if (error) throw error;
	
	//baby names
	var AsianNameList=[];
	var BlackNameList=[];
	var HispanicNameList=[];
	var WhiteNameList=[]; 
	
	//number of babies with name
	var AsianNameCount=[];
	var BlackNameCount=[];
	var HispanicNameCount=[];
	var WhiteNameCount=[]; 
	
	//ethnicity of mother
	var AsianEthnicity=[]; 
	var BlackEthnicity=[]; 
	var HispanicEthnicity=[]; 
	var WhiteEthnicity=[]; 
	
	var data=[]; //3D array of nameList, nameCount, ethnicity
	var dobj=[]; //array formated specifically for hierarchical processing 
	
	root.forEach(function (d) {
		if (+d["RNK"] <= 10) {
		
			//only add name if it's not uniquely in the array
			if ((d["ETHCTY"]==="ASIAN AND PACIFIC ISLANDER") && (AsianNameList.indexOf(d["NM"]) ===-1)) {
				AsianNameList.push(d["NM"]);
				AsianNameCount.push(+d["CNT"]); //force the string into an integer
				AsianEthnicity.push(d["ETHCTY"]);
			}
			else if ((d["ETHCTY"]==="BLACK NON HISPANIC") && (BlackNameList.indexOf(d["NM"]) ===-1)) {
				BlackNameList.push(d["NM"]);
				BlackNameCount.push(+d["CNT"]); //force the string into an integer
				BlackEthnicity.push(d["ETHCTY"]);
			}
			else if ((d["ETHCTY"]==="HISPANIC") && (HispanicNameList.indexOf(d["NM"]) ===-1)) {
				HispanicNameList.push(d["NM"]);
				HispanicNameCount.push(+d["CNT"]); //force the string into an integer
				HispanicEthnicity.push(d["ETHCTY"]);
			}
			else if ((d["ETHCTY"]==="WHITE NON HISPANIC") && (WhiteNameList.indexOf(d["NM"]) ===-1)) {
				WhiteNameList.push(d["NM"]);
				WhiteNameCount.push(+d["CNT"]); //force the string into an...