Skip to main content
100%

Line Chart with Multiple Lines

✓ Published2🌍 Public
SSean Moore
Last edited Nov 12, 2019
Created on Nov 12, 2019

This line chart displays one week of temperature data in degrees Celsius for cities worldwide, sourced from Data Canvas - Sense Your City. The visualization uses multiple lines to compare temperature trends across cities, with each line color-coded by city name. Built with D3 version 5, the code employs `d3.scaleTime`, `d3.scaleLinear`, and `d3.scaleOrdinal` for scaling, `d3.line` with `d3.curveBasis` for path generation, and `d3.nest` for grouping data. A custom color legend component (`colorLegend.js`) renders the categorical color scale, while axes are drawn using `d3.axisLeft` and `d3.axisBottom` with gridlines.

AI-generated description

This line chart shows one week of temperature (in degrees Celcius) in cities around the world. The data comes from Data Canvas - Sense Your City.

MIT Licensed

Similar vizzes