Hashing Points
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Apr 19, 2013
This example tests a hash function for point coordinates by animating a bar chart. It loads U.S. county geometries from TopoJSON, extracts polygon ring coordinates, and hashes each pair of floats into one of 256 bins using `hash2`, which combines two 32-bit hashes of `Float64` values. The bars update in real time via `d3.timer` as points are processed, revealing the distribution’s uniformity. The visualization uses `d3.scale.ordinal` for bin positions and `d3.svg.axis` for the x-axis.
AI-generated descriptionTesting a possible hash function for points (pairs of floating-point coordinates).
gpl-3.0 Licensed