Skip to main content
100%

D3 Course 14: Melting Data for Multiple Lines

✓ Published1🌍 Public
GGabrz
Last edited May 14, 2020
Created on May 13, 2020

This visualization displays population estimates and projections for world regions from 1950 to 2100, with each region shown as a distinct colored line. A vertical black line marks a selected year, and users can move their mouse across the chart to update this selection. The code uses d3.csv to load two UN population datasets, merges them after melting columns into rows, and applies d3.timeParse to handle yearly dates. The lines are rendered as SVG paths using d3.line, with d3.scaleTime, d3.scaleLinear, and d3.scaleOrdinal managing the axes and colors.

AI-generated description

Data Visualization with D3 course; Melting & Munging Data

<h3>Melting & Munging Data</h3> <table> <th align="left">Topics</th> <tr> <td> <ul> <li><b>Melting columns into rows</b></li> <li><b>Filtering out undesirable values</b></li> <li><b>Merging multiple data tables</b></li> <li><b>Correctly parsing dates with d3.timeParse</b></li> <li><b>Renaming long names for labels</b></li> </ul> </td> </tr> </table>
MIT Licensed

Similar vizzes