Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Label Filtering Algorithm Prototype

Public visualization

Viewing a saved revision (read-only)

6d57b1bc211740f080ce5693c8e0237b

Fork of Label Filtering Algorithm Prototype

0 stars0🌍 Public
GGuo Ci
Last edited Jul 30, 2024
Created on Jul 11, 2024

This visualization demonstrates a label placement algorithm for maps and scatter plots, showing city names positioned without overlapping. It projects world cities using a Natural Earth projection and renders population density as colored contours. The code uses D3 methods like `geoNaturalEarth1`, `contourDensity`, and `scaleSequential` for the map, while collision detection relies on the RBush spatial index. Labels are filtered by population threshold and hidden when their bounding boxes intersect, with data from the visionscarto-world-atlas and worldcitiesReduced datasets.

AI-generated description

A proof of concept for a label placement algorithm that can be used to add labels to maps and scatter plots.

MIT Licensed