All examples By author By category About

emeeks

Simple Choropleth - d3.carto.map

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.