Filtering London air quality data from January 2010 through August 2018, this interactive visualization displays yearly trends for multiple pollutant measures as colored lines, with each year distinguished by a sequential purple color scale. A dropdown menu lets users switch the y-axis among variables like PM2.5, PM10, and nitrogen oxides, updating the line chart with a smooth 1.5-second transition. Built with D3 v5, the example uses `d3.nest` to group data by year, `d3.line` with a basis curve for path generation, and a custom dropdown component; a color legend maps each year to its hue.
AI-generated descriptionData in this scatter plot is from from the Kings College London Air Quality Dataset in the London Datastore. The data is from January 2010 through August 2018.
</n> Inspiration from Curran and this Vis. This week I spent time munging the data and adding a dropdown menu.
Comments
Sign in to join the discussion.