An interactive data visualization proving AI training compute broke Moore's Law in 2012.
This visualization tells a data-driven story in five acts:
- The Anchor: Establish 1 FLOP = 1 Human math problem per second
- The Speed Limit: Show Moore's Law as the "golden rule" (2Γ every 2 years)
- The Break: Reveal how AlexNet (2012) shattered that curve
- The Scale: Measure the magnitude (GPT-4 = 600 million human lifetimes)
- The Credits: Data sources, tech stack, and attribution
As you scroll, the chart dynamically zooms to highlight each milestone. Interactive tooltips reveal human-scale analogies ("600 million years"), and the "Unzipper" animation physically demonstrates the scale by shooting modern AI models off the screen.
# Clone the repository
git clone <your-repo-url>
cd scrollytelling
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
- Svelte 5 - Reactive UI framework
- D3.js v7 - Data visualization (scales, shapes, axes)
- Scrollama - Scroll-driven narrative engine
- Vite - Lightning-fast build tool
App.svelte (State Orchestrator)
βββ Background.svelte (Layer 0: Hardware silhouettes)
βββ Chart.svelte (Layer 1: D3 SVG visualization)
βββ Scrolly.svelte (Layer 2: Scroll sensor)
βββ Narrative.svelte (Text panels)
// Chart.svelte
export let xDomain = [1900, 2026];
export let yDomain = [1e0, 1e27];
$: xScale = scaleLinear().domain(xDomain).range([0, innerWidth]);Enables animations without component reloads.
// App.svelte
const yDomainTween = tweened([1e0, 1e27], {
duration: 1200,
easing: cubicOut
});
// On scroll step change
yDomainTween.set([1e3, 1e18]); // Smoothly animates- z-index 0: Background (fixed, subtle icons)
- z-index 1: Chart (sticky, remains visible)
- z-index 2: Text (scrollable, glassmorphic panels)
scrollytelling/
βββ src/
β βββ components/
β β βββ Chart.svelte # D3 visualization (reactive scales)
β β βββ Background.svelte # Step-based hardware icons
β β βββ Scrolly.svelte # Scrollama wrapper
β β βββ Narrative.svelte # Text step panels
β βββ data/
β β βββ compute_history.json # 8 milestone data points
β βββ App.svelte # State management & domain switching
β βββ main.js # Entry point
β βββ app.css # Global styles
βββ CHANGELOG.md # Version history & design decisions
βββ package.json
βββ vite.config.js
βββ svelte.config.js
Each data point in compute_history.json follows this structure:
{
"id": "gpt-4",
"name": "GPT-4",
"organization": "OpenAI",
"date_decimal": 2023.25,
"training_compute_flops": 2e25,
"training_cost_usd": 100000000,
"category": "Deep Learning",
"hardware_analogy": "The Galaxy",
"is_highlight": true
}Key Milestones:
- The Human (1900, 1 FLOP)
- ENIAC (1945, 10^5 FLOPs)
- AlexNet (2012, 10^18 FLOPs) β THE BREAK
- GPT-4 (2023, 2Γ10^25 FLOPs)
- Safety Orange (#F5A623): Moore's Law, Historical era
- Electric Purple (#BD10E0): Deep Learning era, AI models
- Off-White (#F9F9F9): Background (academic paper aesthetic)
- Headings: Inter (Bold)
- Technical Labels: JetBrains Mono
- Body Text: Inter (Regular)
- Duration: 1200ms (empirically tested for "heavy camera" feel)
- Easing: cubicOut (fast start, slow settle)
- Transitions: 800ms for background icons
npm run dev- β Scroll down slowly - Chart should zoom smoothly
- β Step 0: Human baseline (1 FLOP) is clearly visible
- β Step 1: Orange Moore's Law line appears
- β Step 2: Purple AI dots "explode" upward
- β Background icons fade (π€ β π₯οΈ β π’)
- β Text boxes have glassmorphic blur effect
Enable Scrollama visual debugger:
// Scrolly.svelte
.setup({
debug: true // Shows step boundaries
})# Start dev server with hot reload
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Save git checkpoint (Windows)
save_checkpoint.batSee CHANGELOG.md for detailed version history.
- Static D3 chart with reactive scales
- Logarithmic Y-axis (1 β 10^27 FLOPs)
- Moore's Law reference line
- 3-layer architecture foundation
- Scrollama integration
- Tweened domain animations
- Glassmorphic narrative panels
- Background silhouette fading
- Interactive tooltips with human scale analogies
- Linear scale toggle ("unzip" the logarithmic compression)
- Industrial futurism design system
- Elastic mouse-following tooltip animations
- Hover states and micro-animations
- Mobile responsive layout (40vh sticky chart)
- Touch interaction system (tap-to-toggle tooltips)
- Production deployment configuration
- Credits footer with data sources
- GitHub Pages ready builds
- Keyboard navigation for data points
- ARIA live regions and screen reader support
- Shareable URL states with query parameters
- Accessibility audit (WCAG AA compliance)
This is a learning project demonstrating scrollytelling techniques. If you'd like to extend it:
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (see commit format in CHANGELOG.md)
- Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
- Reactive statements (
$:) eliminate useEffect dependency hell - Smaller bundle size (no virtual DOM)
- Built-in motion/tweening library
- Declarative DOM updates ideal for data visualization
- Linear scale cannot display 26 orders of magnitude (1 β 10^27)
- Log scale compresses exponential growth into visual space
- Aligns with scientific thinking (powers of 10)
- Industry standard (used by NYT, FiveThirtyEight)
- Intersection Observer API (performant)
- Simple API surface area
Empirically tested:
- 600ms: Too snappy, feels buggy
- 1000ms: Better, but rushed
- 1200ms: Perfect "heavy camera" feel β
- 1800ms: Too slow, loses engagement
See CHANGELOG.md for more architectural rationale.
- NYT Graphics - Scrollytelling patterns
- Our World in Data - Compute visualizations
- FiveThirtyEight - Data-driven narratives
- Epoch AI - ML compute dataset
- Our World in Data - Historical compute
MIT License - See LICENSE file for details.
- None in v0.4.0 (Phase 4 complete and verified)
- Alternative views: Toggle linear vs. log scale
- Data export: Download chart as SVG/PNG
- Shareable URLs: Link to specific scroll steps
- Narration mode: Auto-scroll through story
- 3D mode: Experimental WebGL rendering
For questions or feedback, open an issue on GitHub.