Skip to main content
Public

Share visualization

Loading preview…

Melting Data for Multiple Lines

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Melting Data for Multiple Lines

0
Jjlspangl
Last edited Oct 14, 2021
Created on Oct 14, 2021

This chart shows projected population growth by region from 1950 to 2100, with each line representing a different world region and colored via a categorical scale. The data is sourced from UN population estimates, loaded from two CSV files and melted into a tidy format. The visualization uses d3.line with curveBasis to smooth the paths, d3.nest to group data by region, and d3.scaleTime and d3.scaleLinear for axes. A custom colorLegend component renders circles and labels in SVG, while axis gridlines and a title complete the layout.

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.

Comments

Sign in to join the discussion.

MIT Licensed