Melting Data for Multiple Lines
This example visualizes population trends for multiple countries over time as a series of colored lines, using a legend to identify each country. The chart displays time on the x-axis and population on the y-axis, with a title and axis labels. The code uses `d3.csv` to load data from a UN population estimates dataset, which is then "melted" from wide to long format to create individual line paths. It leverages D3 v6 APIs including `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line`, `curveBasis`, `axisLeft`, `axisBottom`, and `group`, rendering the final visualization as an SVG.