score:2

Accepted answer

you can get x, y coordinates from projection:

var projection = d3.geo.mercator()
            .center([0, 5 ])
            .scale(150);

projection([long, lat]);

for animation you could either use either d3 transitions example or css.

i have created a block for you: http://bl.ocks.org/ckothari/32149f15261b9c5c7a56c40f7f6b353d

edit sorry, just realized your question was about using http://datamaps.github.io/. let me know if you can use topojson, else i will delete my answer.

edit-2 to color country:

d3.tsv('data.csv', function(data){
            g.selectall('path')
                    .filter(function(d){
                        return data.find(function(d1){
                            return d1.iso == d.properties.iso_a2;
                        })
                    })
                    .attr('class', 'selected');
   //...
 })

edit-3 chaining transitions updated example: https://bl.ocks.org/ckothari/raw/32149f15261b9c5c7a56c40f7f6b353d/

also see http://bl.ocks.org/mbostock/1125997.


Related Query

More Query from same tag