Gist c2941bd5dea0fa130792
This chart shows the projected and historical population of school-age children (5–17) and seniors (65+) across New York City’s five boroughs from 1960 to 2040, with each age group’s share of the total population tracked over time. Using D3.js, the visualization renders multiple small-multiple line charts per borough, with the x-axis representing decades and the y-axis showing percentage of total population. The code draws paths for each series, colors the lines by age group, and adds labels and axes via SVG elements. Data comes from a comma-separated values table embedded in the gist, and the rendering relies on D3’s scales, line generators, and text utilities.