Skip to main content
100%

Census Tracts Contours with Two Variables and City Labels

✓ Published2🌍 Public
CCurran Kelleher
Last edited Oct 9, 2025
Created on May 10, 2024

This example visualizes demographic patterns across New York City census tracts as smooth, colored contour layers, with orange representing the Black population and green representing the White population. The contours are computed from a grid of sampled values using spatial indexing with RBush and point-in-polygon tests via Turf. City labels appear for municipalities above a population threshold, and the orthographic projection supports pan and zoom interactions. The visualization relies on D3’s `geoPath`, `contours`, `geoTransform`, and `scaleSequential` APIs, with data sourced from the 2023 Census Tracts and ACS demographics.

AI-generated description

A rough prototype for computing contours from census tracts. Warning: performance is poor! This has not been optimized.

Data for New York census tracts, downloaded from https://www.census.gov/cgi-bin/geo/shapefiles/index.php?year=2023&layergroup=Census+Tracts and processed using https://mapshaper.org/.

Data resides in Gist: New York City Census Tracts.

See also:

MIT Licensed

Similar vizzes