Skip to main content
100%

Melting Data for Multiple Lines

✓ Published0🌍 Public
Jjlspangl
Last edited Oct 14, 2021
Created on Oct 14, 2021

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 d3.scaleTime for the x-axis, d3.scaleLinear for the y-axis, and d3.scaleOrdinal with a category10 color scheme to distinguish each city as a separate line. Rendering with SVG, the code employs d3.line with curveBasis for smooth paths, d3.nest to group data by city, and a custom colorLegend function. A small multiple of circles on the legend indicates which city corresponds to which colored line.

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