Assignment 6: Line Chart with Color Legend
✓ Published2🌍 Public
Hhxu51@usfca.edu
Last edited Mar 4, 2025
Created on Mar 4, 2025
This visualization displays average carrier values per airport category across years as a multi-line chart, with each of four categories drawn as a distinct colored line. The chart uses D3.js v7, loading data from a remote CSV file and aggregating it by year and category. It leverages D3’s `scaleLinear` for axes, `scaleOrdinal` with a ColorBrewer `Set2` palette for the categorical color scheme, and `d3.line` for path generation. An HTML/SVG legend, built via the d3-legend library, accompanies the plot, with axes and lines styled via CSS.
AI-generated descriptionMIT Licensed