this is my first gist to block
xxxxxxxxxx
<meta charset="utf-8">
<link rel="stylesheet" href="light.css">
<body>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
<script>
var width = 960,
height = 600;
var path = d3.geo.path()
.projection(null);
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
d3.json("us.json", function(error, us) {
if (error) throw error;
svg.append("path")
.datum(topojson.feature(us, us.objects.nation))
.attr("class", "land")
.attr("d", path);
svg.append("path")
.datum(topojson.mesh(us, us.objects.states, function(a,b) { return a !==b; }))
.attr("class", "border border--state")
.attr("d", path);
svg.append("g")
.attr("class", "bubble")
.selectAll("circle")
.data(topojson.feature(us, us.objects.counties).features)
.enter().append("circle")
//find the centroid of the county and put the dot there
.attr("transform", function(d) { return "translate(" + path.centroid(d) + ")"; })
//choose the radius size
.attr("r", function(d) { return Math.sqrt(parseFloat(d.properties.profit)* 0.00005) });
});
</script>
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://d3js.org/topojson.v1.min.js to a secure url
https://d3js.org/d3.v3.min.js
https://d3js.org/topojson.v1.min.js