Skip to main content
Public

Share visualization

Loading preview…

City density filtering by population and proximity, Mercator

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

City density filtering by population and proximity, Mercator

0
AAlan McConchie
Last edited Aug 24, 2021
Created on Aug 11, 2021

This visualization filters city labels by population and proximity on a Mercator projection. Gray dots represent all cities from an OpenStreetMap dataset (tagged `place=city`), while highlighted dots show larger cities with smaller neighbors filtered out within a variable buffer radius. The example uses `d3.geoMercator` and `d3.geoPath` for mapping, `d3.scaleSqrt` for circle sizing, and `d3.scaleLinear` for buffer scaling. Country boundaries come from World Atlas TopoJSON, processed with the TopoJSON library. The algorithm applies a proximity-based filtering approach with variable buffer distances, demonstrating a method for decluttering dense point data.

AI-generated description

Experimental algorithm for filtering place labels.

Gray dots are all the cities in the input data, which are features from OpenStreetMap tagged with place=city. (Cities in India are missing from this dataset)

Highlighted 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)

Comments

Sign in to join the discussion.

ISC Licensed