PM2.5 For Selected Country
A line chart displays PM2.5 pollution trends for a selected country from 2010 to 2017, with country choices via a dropdown menu. The visualization loads CSV data from a Kaggle dataset and processes it with d3.csv, then renders an SVG using D3 v5’s scaleLinear, axisBottom, axisLeft, and line with curveBasis. A color legend, generated via a custom colorLegend function using scaleOrdinal and schemeCategory10, shows the selected country’s line color. React dropdown styling is referenced, though rendering relies directly on D3 selections.