Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Recession Graph

Public visualization

Viewing a saved revision (read-only)

f0da25afe21349d1baa2261fe128f76b

Recession Graph

0 stars0🌍 Public
Sshubhambhalala
Last edited Dec 15, 2022
Created on Dec 15, 2022
Forked from HTML Starter

This visualization displays US recession periods from 1854 to 2021 as a sequence of bars, where blue bars indicate recession years and the y-axis shows recession status (0 or 1). Users step forward or backward through time using "Next Year" and "Previous Year" buttons, which dynamically append or remove data points. The implementation uses D3 v7 with SVG rendering, employing d3.scaleBand for the x-axis, d3.scaleLinear for the y-axis, and the general update pattern with transitions that slide new orange bars into place before recoloring them blue.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.