Population Pyramid
This population pyramid visualizes the distribution of U.S. male and female populations across five-year age brackets from 1850 to 2000. Overlapping translucent bars show both sexes simultaneously, with blue for males and pink for females, while arrow keys animate the displayed year. The D3 v3 code builds an SVG with sliding birthyear groups, using `d3.nest` to structure data from the Minnesota Population Center and `transition` to smoothly update bar heights and positions.
AI-generated descriptionThis diagram shows the distribution of age groups in the United States over the last 150 years. Use the arrow keys to observe the changing population. Data from the Minnesota Population Center. Use the arrow keys to change the displayed year. The blue bars are the male population for each five-year age bracket, while the pink bars are the female population; the bars are partially transparent so that you can see how they overlap, unlike the traditional side-by-side display which makes it difficult to compare the relative distribution of the sexes.
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4062085'>Population Pyramid</a>