Melting Data for Multiple Lines
This visualization displays population over time by region using multiple lines, with a legend positioned to the right. The chart uses d3.scaleTime, d3.scaleLinear, and d3.scaleOrdinal with schemeCategory10 for color encoding. Data is processed through a custom melt function that reshapes UN population estimates from wide to tidy format, combining estimates from 1950–2014 with medium-variant projections through 2100. The line generator uses curveBasis for smooth paths, while axes employ d3.axisBottom and d3.axisLeft with gridlines.