Fixed projection for US States
✓ Published1🌍 Public
This example displays a choropleth map of US states using D3 v5 and the TopoJSON us-10m dataset, where each state is drawn as an SVG path with d3.geoPath. The map is projected using d3.geoAlbersUsa. Avocado sales data from a CSV file (specifically for January 15, 2017) is joined to state features. Red circles are placed at each state’s centroid (via d3.geoCentroid) to indicate data points, while CSS classes define region-specific fill colors for the Northeast, Midwest, South, and West, although region merging is commented out.
AI-generated descriptionMIT Licensed