Built with blockbuilder.org
xxxxxxxxxx
<meta charset="utf-8">
<style>
.country {
fill: #ccc;
stroke: #777;
}
.conflict {
fill-opacity: .5;
stroke: #f00;
fill: #f00;
stroke-width: .5px;
}
</style>
<body>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://d3js.org/topojson.v0.min.js"></script>
<script>
var conflict = [{'number': 'Kayes', 'poverty': 62.4, 'longitude': -11.445272,'latitude': 14.436788},
{'number': 'Koulikoro', 'poverty': 59.5, 'longitude': -7.43814,'latitude': 13.80181},
{'number': 'Sikasso', 'poverty': 65.8, 'longitude': -5.69840,'latitude': 11.32238},
{'number': 'Segou', 'poverty': 68.2, 'longitude': -6.24821,'latitude': 13.43166}, {'number': 'Mopti', 'poverty': 76.2, 'longitude': -4.19746, 'latitude': 14.48743}];
var radius = d3.scale.sqrt()
.domain([0, 70])
.range([0, 3.36]);
var width = 960,
height = 500;
var projection = d3.geo.orthographic()
.scale(250)
.translate([width / 2, height / 2])
.clipAngle(90)
.rotate([-30,0]);
var path = d3.geo.path()
.projection(projection);
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
d3.json("https://cdn.rawgit.com/mbostock/4090846/raw/8a7f176072d508218e120773943b595c998991be/world-50m.json", function(error, data) {
svg.append("path")
.attr("class", "country")
.datum(topojson.object(data, data.objects.countries))
.attr("d", path);
svg.selectAll(".conflict")
.data(conflict)
.enter()
.append("circle")
.attr("class","conflict")
.attr("r", function(d){return radius(d.poverty);})
.attr("cx", function(d){ return projection([d.longitude, d.latitude])[0];})
.attr("cy", function(d){ return projection([d.longitude, d.latitude])[1];});
});
</script>
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://d3js.org/topojson.v0.min.js to a secure url
https://d3js.org/d3.v3.min.js
https://d3js.org/topojson.v0.min.js