SF Bay Area G. Riha Air Pollution and Income
The scatterplot visualizes the correlation between PM2.5 air pollution levels and various socioeconomic attributes across census tracts in the San Francisco Bay Area and Los Angeles. Users select which attribute to display on the y-axis and which region to analyze via dropdown menus. The visualization uses D3.js (v5) to render an interactive scatterplot with animated transitions, where each circle represents a tract and its position is determined by the selected variables. The code leverages D3's `scaleLinear`, `axisLeft`, and `axisBottom` functions to construct the axes, while the `dropdownMenu` component manages user input. Data is loaded from a local CSV file containing median household income, family income, healthcare coverage, and poverty rates.
AI-generated description