Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Melting Data for Multiple Lines

Public visualization

Viewing a saved revision (read-only)

76faa5f680514791974b198f38898e69

Melting Data for Multiple Lines

0 stars0๐ŸŒ Public
Cczy68
Last edited Apr 2, 2020
Created on Apr 2, 2020

This visualization uses D3.js (v5) to animate the growth of confirmed COVID-19 cases across multiple countries, displaying them as a series of colored lines on a scatter plot. The lines are drawn using `d3.line` with `curveBasis` smoothing, and each country is distinguished by color from `d3.schemeCategory10`. The animation progresses through time by updating the data on a timer, redrawing the line paths with `transition().duration(1000)`, and the labels and circles animate to track the latest values. Data is processed from CSV files, where the code melts the data from a wide format into a long format for plotting.

AI-generated description