block by emeeks 80dc1e4c11586c47a266

Simple Choropleth - d3.carto.map

Full Screen

A simple choropleth map made with d3.carto.map.

After adding a topojson layer, you can access the features either by using map.layers() or the layer if assigned to a variable or via d3.selectAll.data() on the appropriate elements. You can then style the features based on their properties. In this case, the size of the ward.

Some hover behavior can also be defined using D3.

index.html

d3map.css