Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Assignment 6: Line Chart with Color Legend

Public visualization

Viewing a saved revision (read-only)

c006f4df77df43148fa092efbe8e15d0

Assignment 6: Line Chart with Color Legend

0 stars2🌍 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 description