All examples By author By category About

patricksurry

Force layout with dynamic distance function

Click and drag to move states around. Move slider to modify distance function

Fork of mbostock's force layout example (/mbostock/1073373) with a few experimental changes.

Create links between neighbouring states (inferred from topojson mesh) rather than from Voronoi triangles which add some unstable cross-country links like Maine-Washington. Parameterize distance function with a slider (0 = spatial similarity only, 1 = more variation based on type similarity).