Skip to main content
100%

City density filtering by population and proximity

✓ Published2🌍 Public
AAlan McConchie
Last edited Jun 12, 2024
Created on Jul 27, 2021

This interactive map visualizes global city density by filtering prominent urban centers from smaller neighbors. Gray dots represent all cities with populations over 50,000 from OpenStreetMap data, while blue and white highlighted cities emerge through an iterative algorithm that suppresses less populous cities within proximity-based buffers. The visualization uses D3.js with `geoNaturalEarth1` projections, `geoPath` for rendering country boundaries from World Atlas TopoJSON, and Turf.js functions like `buffer`, `booleanPointInPolygon`, and `distance` to calculate exclusion zones. Circle sizes reflect population through a square-root scale, while buffer radii decrease for larger cities.

AI-generated description

A world map showing cities with population greater than 50,000. City data from OpenStreetMap, querying all features with place=city.

Gray dots are all the cities in the input data. (Cities in India are missing from this dataset)

Blue and white dots show biggest cities with all their smaller neighbors (within a given radius) filtered out.

Country boundaries from World Atlas TopoJSON, polished for visual style. (That part forked from Sized Points on a Map)

ISC Licensed

Similar vizzes