Skip to main content
100%

Fork of Svelte + D3: Line

✓ Published0🌍 Public
SSafrin La Batu
Last edited Feb 28, 2024
Created on Feb 28, 2024
Forked from Svelte + D3: Line

This example visualizes daily global surface temperatures from 1940 to 2024, with each year drawn as a separate line across the day-of-year axis. The visualization highlights the two most recent years—2023 in pink and 2024 in blue—while older years appear as semi-transparent white lines, making recent warming trends immediately visible. The code uses d3.csv with autoType to load data, then builds scales with scaleLinear and generates smooth paths via d3.line with curveCatmullRom. A custom opacity scale fades historical years, while the current and previous year are drawn with full opacity and thicker strokes. The data originates from ClimateReanalyzer’s daily surface temperature records, and the visualization is rendered as SVG within a Svelte component.

AI-generated description

Daily surface temperatures since 1940. One line = one year.

Data source: https://climatereanalyzer.org/clim/t2_daily/?dm_id=world

MIT Licensed

Similar vizzes