Skip to content

Commit 5ec4cb9

Browse files
jeremymanningclaude
andcommitted
fix data-viz visual issues: SVGs for scatter, heatmap, choropleth, box/violin
- Replace broken inline scatter chart with custom SVG (visible data points, trend line, proper axis labels) - Add heatmap SVG with Dartmouth green gradient, day×time grid, colorbar - Replace choropleth PNG with schematic SVG matching theme colors - Regenerate box/violin SVG: larger fonts (14-18px), cleaner violin shapes, no panel titles - Fix Minard SVG: revert to Wikipedia original layout (fonts were broken by scaling), apply only color remaps (orange advance, forest green retreat, transparent bg) - Scale pie chart slide to 80% - Gapminder GIF: transparent bg, visible legend, smooth 116-frame animation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f0a12ff commit 5ec4cb9

5 files changed

Lines changed: 639 additions & 221 deletions

File tree

slides/data-viz.md

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -175,36 +175,13 @@ height: 380px
175175

176176
# Scatter plot: revealing relationships between variables
177177

178-
```chart
179-
type: scatter
180-
labels: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
181-
datasets:
182-
- label: Study hours vs. exam score
183-
data: 42, 48, 55, 52, 63, 58, 70, 65, 75, 80, 78, 88
184-
palette: cdl
185-
caption: Each point is one student — more study hours correlate with higher scores
186-
xlabel: Hours studied
187-
ylabel: Exam score
188-
height: 380px
189-
```
178+
<p style="text-align: center;"><img src="figs/scatterplot.svg" style="width: 85%; max-width: 950px;"></p>
190179

191180
---
192181

193182
# Heatmap: showing magnitude in a matrix
194183

195-
<div class="definition-box" data-title="A table where numbers become colors">
196-
197-
A heatmap displays values in a **grid** using **color intensity** instead of numbers. Darker or more saturated colors represent higher (or lower) values.
198-
199-
- Great for: correlation matrices, gene expression, time-of-day patterns, confusion matrices
200-
201-
</div>
202-
203-
<div class="example-box" data-title="You've already seen one!">
204-
205-
The "which representation is clearest?" slide earlier was a heatmap — pixel brightness encoded the face data. The heatmap revealed a pattern that raw numbers could not!
206-
207-
</div>
184+
<p style="text-align: center;"><img src="figs/heatmap.svg" style="width: 80%; max-width: 900px;"></p>
208185

209186
---
210187

@@ -248,6 +225,8 @@ height: 360px
248225

249226
---
250227

228+
<!-- _class: scale-80 -->
229+
251230
# Pie chart: parts of a whole (use sparingly!)
252231

253232
```chart
@@ -299,17 +278,7 @@ height: 400px
299278

300279
# Choropleth map: coloring regions by value
301280

302-
<div class="definition-box" data-title="Geographic heatmap">
303-
304-
A choropleth map colors geographic regions (countries, states, counties) by a data value. The color intensity represents magnitude.
305-
306-
- Great for showing **regional variation** (election results, income levels, disease prevalence)
307-
- Can be misleading: large but sparsely populated areas dominate visually
308-
- Consider **bubble maps** (sized circles on a map) as an alternative
309-
310-
</div>
311-
312-
![height:280px](figs/cloropleth.png)
281+
<p style="text-align: center;"><img src="figs/choropleth.svg" style="width: 80%; max-width: 900px;"></p>
313282

314283
---
315284

0 commit comments

Comments
 (0)