D3 + Leaflet for Canada
✓ Published0🌍 Public
BBrideau
Last edited Nov 30, 2015
Created on Nov 24, 2015
A choropleth-style map of Canadian 2011 federal polling districts is rendered over Leaflet base tiles, using D3.js to project and draw the district boundaries as SVG paths. The code uses `d3.geo.path` with `d3.geo.transform` to convert geographic coordinates to Leaflet layer points, and `topojson.feature` to decode the district geometries from the provided TopoJSON file. Hovering highlights each district in red based on the CSS `path:hover` rule. The map is built with D3 v3 and Leaflet v0.7.7, initialized to a view centered over Canada.
AI-generated descriptionD3 + Leaflet: Canadian 2011 Polling Districts.
Adapted from Mike Bostock's D3 + Leaflet