I have this function to make a d3-geomap that is called when my app first loads. But how do I update the map with new data without redrawing a whole new map?
function buildMap(dataToShow){
var map = d3.geomap.choropleth()
.geofile('https://d3-geomap.github.io//d3-geomap/topojson/world/countries.json')
.colors(colorbrewer.YlGnBu[9])
.column('figure')
.format(function(d) {return (Math.round(d * 10) / 10).toFixed(2)+"%";})
.legend(true)
.unitId('ccode')
.domain(chartDomain)
.zoomFactor(5);
d3.select('#map')
.datum(dataToShow)
.call(map.draw, map);
}