Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Final Project- Multiple line chart

Public visualization

Viewing a saved revision (read-only)

7fd2334498fd41f5959891e388bbb1b8

Final Project- Multiple line chart

0 stars0🌍 Public
Mmhzahdeh@dons.usfca.edu
Last edited Apr 7, 2025
Created on Feb 10, 2025

This visualization shows GDP per capita trends from 2019 to 2023 for five selected countries: the United States, India, Germany, Brazil, and China. The chart displays five polylines, one per country, with distinct colors and a legend identifying each line. The SVG rendering uses `d3.line()` to generate the paths and `d3.scalePoint()` for the x-axis years, while `d3.legendColor()` creates the color legend. Data is loaded from a CSV file via `d3.csv()` and processed into long format for plotting.

AI-generated description

'https://gist.githubusercontent.com/eunicetu16/2192dfd3f280dc9d0b96bb83c89dbd7b/raw/1f5e5c08cb40178bf14ab08586c74666da072d44/city_mpg.csv'

The original dataset is from 'https://corgis-edu.github.io/corgis/csv/cars/', and take only 'Fuel Information.City mpg' columns and group them into 8 groups. And have the counts for each group.