Fixed projection for US States
✓ Published1🌍 Public
This example displays a map of US states colored in green, with red dots marking the geographic centroid of each state based on avocado sales data from January 15, 2017, loaded from a CSV file. The visualization uses d3.geoPath with the geoAlbersUsa projection to render the TopoJSON state boundaries, while d3.geoCentroid calculates the center points for the circles. The map is rendered as SVG and includes d3.zoom functionality for interactive panning and scaling, with state features merged from the TopoJSON data and augmented with CSV attributes.
AI-generated descriptionMIT Licensed