🌍 Public
Viewing a saved revision (read-only)
319b697d146c4004a2d19b6555ae0b46
Fork of World Cities
This example visualizes the distribution of U.S. cities and their populations as small dots overlaid on a map of the United States, with state boundaries outlined in white. It first renders the country outline and graticule, then projects each city’s longitude and latitude using `d3.geoAlbersUsa` and draws them as circles. The visualization fetches TopoJSON state boundaries from `us-atlas` and CSV city data from a GitHub-hosted dataset, parsing populations with D3’s `csvParse`. A subtle graticule grid and black outline frame the map, while city dot radius remains fixed at 0.2 pixels.
AI-generated descriptionA world map showing cities.
See also:
- Simplemaps: World Cities Database
- Wikipedia: Toggle the table of contents Geographic coordinate system
- d3-geo: projection(point)
MIT Licensed