Skip to main content
100%

Fork of Barley PunchCard Square Chart v5 - static

✓ Published0🌍 Public
JJimMaltby
Last edited May 14, 2022
Created on May 14, 2022

This visualization presents yield data from the classic barley dataset as a static punch-card chart. It displays a single site, Crookston, with barley varieties along the vertical axis and years on the horizontal axis, using square rectangles sized by yield value. The code uses D3 v5’s `d3.nest()` to group data hierarchically, `d3.scalePoint()`, `d3.scaleLinear()`, and `d3.scaleSqrt()` for positioning and sizing, and `d3.axisLeft()`/`d3.axisBottom()` for axes. SVG rectangles are colored via `d3.scaleOrdinal(d3.schemeAccent)`.

AI-generated description

Punch card Chart: v5 Static

  • Version 5 D3
  • with Squares rather than Circles (that are harder to compare)

A vanilla HTML implementation of Chris Henrick PunchCard tutorial "D3JS v4 General Update Pattern: Punchcard Chart"

https://clhenrick.io/d3-v4-general-update-pattern-punchcard-chart/

bl.ock: https://bl.ocks.org/clhenrick/2b6b5360748a06b26bfd50d96998b741

MIT Licensed

Similar vizzes