Skip to main content
100%

[Working with spatial data](https://github.com/enjalot/wwsd)

✓ Published0🌍 Public
AAlan McConchie
Last edited Mar 25, 2018
Created on Jun 4, 2017

A mouseover on any city circle nudges all other city circles outward by a fixed offset, then returns them to their original positions on mouseout. The example renders world country boundaries as SVG paths and populated places as scaled circles using a Winkel III projection, with `d3.geo.path` handling geographic coordinates. It uses D3 v3 transitions to animate the circle positions and loads GeoJSON data for countries and populated places from remote URLs.

AI-generated description

Working with spatial data

Example #7

Simple mouse interaction with d3.js. Mouse over a city and it will nudge all the other cities out of the way.

NOTE: we made this on-the-fly in the Stamen dataviz workshop, so it's pretty rough!

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4122298'>U.S. Counties TopoJSON</a>

forked from <a href='http://bl.ocks.org/enjalot/'>enjalot</a>'s block: <a href='http://bl.ocks.org/enjalot/4a449bee40e7b74108de89e303a2a284'>WWSD #5: d3 + TopoJSON</a>

forked from <a href='http://bl.ocks.org/enjalot/'>enjalot</a>'s block: <a href='http://bl.ocks.org/enjalot/d355270ee9e979333040e1a46ff03fc6'>WWSD #7: d3 mouse interaction</a>

gpl-3.0 Licensed

Similar vizzes