Skip to main content
100%

Bivariate Hexbin Map

✓ Published0🌍 Public
Mmbostock
Last edited Feb 26, 2019
Created on Dec 18, 2012

This example maps approximately 3,000 Walmart store locations across the United States using hexagonal binning. It projects the store coordinates with the d3.geoAlbersUsa projection, then groups them into hexagons using d3.hexbin. Hexagon area encodes the number of stores in each bin, while the fill color encodes the median store age, ranging from black for older stores to steelblue for newer ones. The map is rendered as SVG, with d3.geoPath drawing the nation and state boundaries from TopoJSON data.

AI-generated description

This example shows how to use d3-hexbin for hexagonal binning on a map with the d3.geoAlbersUsa projection. Approximately 3,000 locations of Walmart stores are shown. These are binned into hexagons, and the hexagon area encodes the number of stores that fall into each bin. Color encodes the median age of Walmart stores in that area, with the oldest stores in black and the youngest stores in blue.

gpl-3.0 Licensed

Similar vizzes