Graph to map
✓ Published1🌍 Public
This example visualizes a graph of airport connections layered over a map of the United States. It shows how nodes can be positioned geographically on a map or rearranged using a force-directed simulation, with a toggle button switching between the two modes. The code uses D3 v4’s `d3.forceSimulation`, `d3.forceLink`, and `d3.forceManyBody` for layout, while `d3.geoPath` and `d3.geoAlbersUsa` project map features. Node positions come from longitude and latitude data in `data.json`, and the map uses `continental-us.json` GeoJSON features. Elastic transitions animate the shift between map and simulation layouts.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed