Massachusetts Chrolopleth map with interactive legend
This interactive choropleth map of Massachusetts displays county boundaries, with each town colored according to its county. A legend on the right uses an ordinal color scale and responds to mouse hover, dimming non-matching map regions and highlighting the selected county. Built with React and D3 v5, it uses `d3.geoAlbers` and `d3.geoPath` to project and render TopoJSON features converted from Massachusetts town boundary shapefiles via mapshaper. County assignments come from a CSV mapping file, and the legend uses `d3.scaleOrdinal` for color encoding.
AI-generated descriptionThis Map show county boundry of Massachusetts
Geo Shape file are from here
The download Shape file did not contain coordination. Therefore, it is first converted to geojson by ogr2ogr
Geojson then reprocessed by mapshaper to Topojson.
Topojson file is loaded to Github gist
City to County map csv is loaded to gist
legend is added and make it interactive with mouse movement