Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Census Tract Quadtree Aggregation

Public visualization

Viewing a saved revision (read-only)

34cd2ef338084463b71d07ba6fecb6ea

Census Tract Quadtree Aggregation

0 stars2🌍 Public
CCurran Kelleher
Last edited May 23, 2024
Created on May 17, 2024

This map of New York state visualizes census tract demographic data as an interactive choropleth. It uses an R-tree spatial index to sample tract values onto a uniform grid, then aggregates those samples into a quadtree for efficient pan and zoom rendering. The map is drawn as colored rectangles on a Canvas via `d3.geoPath`, with color scales from `d3.interpolateTurbo`.

AI-generated description

Proof of concept for a technique for visualizing Census Tract level data on a map. The goal of this technique is to provide a performant map where you can pan and zooom, approximating a choropleth map. The problem with rendering all census tracts as a choropleth map is that there are just too many, and even WebGL struggles to render so many geometries.

Elements of this technique:

  • Index census tracts in an R-tree
  • Sample census tract data values over a uniform grid using the R-Tree
  • Index the uniform grid in a Quadtree
  • Aggregate data values up the quadtree using averaging
  • Query the quadtree based on the map viewport and a size threshold
  • Adjust the color scale based on the extend of those values
  • Render the values as colored rectangles using Canvas

The idea is that this is a precursor to computing a dynamic contour map.

MIT Licensed