D3 Example
This interactive visualization displays global cities with populations over 100,000 as circles on a world map. Using SVG rendering within a Vue application, each city is represented by a circle whose area corresponds to population, with one filled pixel per 50,000 people. Overlapping city circles create brighter regions, visually encoding population density. Users can pan and zoom to explore, and hovering reveals a tooltip with the city name and population via d3-tip. The visualization supports scroll-wheel zooming and drag-based panning, with data sourced from GeoNames.
AI-generated descriptionThis program allows you to explore the world's cities.
- Zoom in and out with the scroll wheel.
- Pan by dragging.
- Hover over a city to get its name and population.
Each circle represents a city. Each filled in pixel of a circle represents 50,000 people. When city circles overlap, they appear brighter, so brightness can be interpreted as population density.
The data comes from Geonames and shows only cities with population >100,000.
Draws from:
- Example 96 of an introductory D3 tutorial
- Using d3-tip to add tooltips to a d3 bar chart
- d3-tip
- Drag + Zoom example by Mike Bostock
Enjoy exploring!
--Curran, April 2015