This example shows a choropleth map of Connecticut, showing the town subdivisions. The example resizes the map to use the space available, while still keeping the correct aspect ratio.
This visualization is part of a series focused on Run 169. I'm trying to run a road race in each of Connecticut's 169 towns. Green shows that I have already run a race in that town. Hover over a town to see its name and driving time from my town.
To experience the resize behavior, run this example full-screen and resize the browser.
Notes:
forked from curran's block: Responding to Resize
Choropleth map code based on this video
Other data
Used topojson to convert large GeoJSON to TopoJSON and then simplify the shapes. Note that TopoJSON includes topology information, so when the shapes in the map are simplified (for speed) common boundaries between towns remain as common boundaries. In contrast, simplifying GeoJSON files creates gaps.
forked from jpasini's block: [unlisted] Resizable choropleth map
https://d3js.org/d3.v4.min.js
https://d3js.org/topojson.v2.min.js