Skip to main content
100%

Largest Cities by population in 2020

✓ Published0🌍 Public
AAbdul Salam Almadani
Last edited Nov 10, 2020
Created on Oct 25, 2020

This visualization displays the largest U.S. cities by 2020 population as scaled circles overlaid on a map of state boundaries. The map uses the `geoAlbers` projection and `geoPath` to render the states, while circle radii are determined by a `scaleSqrt` function based on population values. City coordinates are projected from latitude and longitude using the same projection. The example is built with React and D3 v5, sourcing city data from a CSV file with population and coordinates, and state boundaries from the us-atlas TopoJSON dataset.

AI-generated description

A the US map showing Largest cities in the USA by population for 2020

City data from Largest Cities by population in the USA.

I used the U.S. Geo Map of State Boundaries for the underlying map. In this iteration, I used the geoAlbers projection to clean up and zoom in on the map. While other projection types appear to gracefully handle a lat/long input of 0, it returns null with this projection, which causes a fatal error when you reference the scaled pixel locations.

finding Latitude and longitude form [latlong] (https://www.latlong.net/category/cities-236-15.html)

MIT Licensed

Similar vizzes