30239-notes/00.value-of-dataviz/slides.html

464 lines
117 KiB
HTML
Raw Normal View History

2024-11-13 23:50:35 +00:00
<!DOCTYPE html><html lang="en-US"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"><meta name="apple-mobile-web-app-capable" content="yes"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta property="og:type" content="website"><meta name="twitter:card" content="summary"><style>@media screen{body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button{appearance:none;background-color:initial;border:0;color:inherit;cursor:pointer;font-size:inherit;opacity:.8;outline:none;padding:0;transition:opacity .2s linear;-webkit-tap-highlight-color:transparent}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:disabled,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:disabled,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:disabled,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:disabled{cursor:not-allowed;opacity:.15!important}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover{opacity:1}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:active,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:active,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover:active,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover:active{opacity:.6}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:not(:disabled),body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:not(:disabled),body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover:not(:disabled),body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover:not(:disabled){transition:none}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev],body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button.bespoke-marp-presenter-info-page-prev{background:#0000 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJNNjggOTAgMjggNTBsNDAtNDAiLz48L3N2Zz4=") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button.bespoke-marp-presenter-info-page-next{background:#0000 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJtMz
2024-09-26 04:41:41 +00:00
* Marp default theme.
*
* @theme default
* @author Yuki Hattori
*
* @auto-scaling true
* @size 16:9 1280px 720px
* @size 4:3 960px 720px
2024-11-13 23:50:35 +00:00
*/div#\:\$p > svg > foreignObject > section{--base-size-4:calc(var(--marpit-root-font-size, 1rem) * 0.25);--base-size-8:calc(var(--marpit-root-font-size, 1rem) * 0.5);--base-size-16:calc(var(--marpit-root-font-size, 1rem) * 1);--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;}div#\:\$p > svg > foreignObject > section [data-theme=light],div#\:\$p > svg > foreignObject > section{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#636c76;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#fff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#afb8c133;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d0d7de;--borderColor-muted:#d0d7deb3;--borderColor-neutral-muted:#afb8c133;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#bf8700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#57606a;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#24292f;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#57606a;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#24292f;--color-prettylights-syntax-markup-bold:#24292f;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#eaeef2;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#8c959f;}div#\:\$p > svg > foreignObject > section [data-theme=dark],div#\:\$p > svg > foreignObject > section:where(.invert){color-scheme:dark;--focus-outlineColor:#1f6feb;--fgColor-default:#e6edf3;--fgColor-muted:#8d96a0;--fgColor-accent:#4493f8;--fgColor-success:#3fb950;--fgColor-attention:#d29922;--fgColor-danger:#f85149;--fgColor-done:#ab7df8;--bgColor-default:#0d1117;--bgColor-muted:#161b22;--bgColor-neutral-muted:#6e768166;--bgColor-attention-muted:#bb800926;--borderColor-default:#30363d;--borderColor-muted:#30363db3;--borderColor-neutral-muted:#6e768166;--borderColor-accent-emphasis:#1f6feb;--borderColor-success-emphasis:#238636;--borderColor-attention-emphasis:#9e6a03;--borderColor-danger-emphasis:#da3633;--borderColor-done-emphasis:#8957e5;--color-prettylights-syntax-comment:#8b949e;--color-prettylights-syntax-constant:#79c0ff;--color-prettylights-syntax-constant-other-reference-link:#a5d6ff;--color-prettylights-syntax-entity:#d2a8ff;--color-prettylights-syntax-storage-modifier-import:#c9d1d9;--color-prettylights-syntax-entity-tag:#7ee787;--color-prettylights-syntax-keyword:#ff7b72;--color-prettylights-syntax-string:#a5d6ff;--color-prettylights-syntax-variable:#ffa657;--color-prettylights-syntax-brackethighlighter-unmatched:#f85149;--color-prettylights-syntax-brackethighlighter-angle:#8b949e;--color-prettylights-syntax-inv
</style></head><body><div class="bespoke-marp-osc"><button data-bespoke-marp-osc="prev" tabindex="-1" title="Previous slide">Previous slide</button><span data-bespoke-marp-osc="page"></span><button data-bespoke-marp-osc="next" tabindex="-1" title="Next slide">Next slide</button><button data-bespoke-marp-osc="fullscreen" tabindex="-1" title="Toggle fullscreen (f)">Toggle fullscreen</button><button data-bespoke-marp-osc="presenter" tabindex="-1" title="Open presenter view (p)">Open presenter view</button></div><div id=":$p"><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="1" lang="en-US">
2024-09-26 04:41:41 +00:00
<h1 id="30239-data-visualization-for-policy-analysis">30239: Data Visualization for Policy Analysis</h1>
<h2 id="james-turk">James Turk</h2>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="2" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="today">Today</h2>
<ul>
<li>What is the value of data visualization?</li>
<li>Focus of this course</li>
<li>Course Logistics</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="3" lang="en-US">
2024-09-26 04:41:41 +00:00
<p><img src="a-day-in-data.jpg" alt="infographic: a day in data" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="4" lang="en-US">
2024-09-26 04:41:41 +00:00
<p><img src="datagov.png" alt="data.gov" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="5" lang="en-US">
2024-09-26 04:41:41 +00:00
<p><img src="taxis.png" alt="taxis" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="6" lang="en-US">
2024-09-26 04:41:41 +00:00
<p>OK, there is <strong>a lot</strong> of data, but isn't that a <strong>good thing</strong>?</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="7" lang="en-US">
2024-09-26 04:41:41 +00:00
<p>&quot;What information consumes is rather obvious: it consumes the attention of its recipients. Hence a wealth of information creates a poverty of attention, and a need to allocate that attention efficiently among the overabundance of information sources that might consume it.&quot;</p>
<p>~Herb Simon<br />
<em>as quoted by Hal Varian. Scientific American, September 1995</em></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="8" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="what-is-visualization">What is Visualization?</h2>
<p>“... finding the <strong>artificial memory</strong> that best supports our natural means of perception.”<br />
<em>[Bertin 1967]</em></p>
<p>“Transformation of the symbolic into the geometric”<br />
<em>[McCormick et al. 1987]</em></p>
<p>“The use of computer-generated, interactive, visual representations of data to <strong>amplify cognition</strong>.”<br />
<em>[Card, Mackinlay, &amp; Shneiderman 1999]</em></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="9" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="information-visualization">Information Visualization</h2>
<p>&quot;The use of computer-generated, interactive, visual representations of (abstract) data to <strong>amplify cognition</strong>.&quot;</p>
<p>What does it mean to amplify cognition?</p>
<p>Why do we often seek visualizations?</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="10" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="why-do-we-create-visualizations">Why do we create visualizations?</h2>
<ul>
<li>What visualizations have you created?</li>
<li>What visualizations have you seen that you remember?</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="11" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="reasons-for-data-visualization">Reasons for Data Visualization</h2>
<ul>
<li>Means of reasoning about large quantities without reduction/over-simplification.</li>
<li>Assist in gaining unique insights into data: clustering, correlation, trends, etc.</li>
<li>Deepen understanding, for ourselves or others.</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="12" lang="en-US">
2024-09-26 04:41:41 +00:00
<h3 id="four-samples">Four Samples</h3>
<table>
<thead>
<tr>
<th>x1</th>
<th>y1</th>
<th>x2</th>
<th>y2</th>
<th>x3</th>
<th>y3</th>
<th>x4</th>
<th>y4</th>
</tr>
</thead>
<tbody>
<tr>
<td>10.0</td>
<td>8.04</td>
<td>10.0</td>
<td>9.14</td>
<td>10.0</td>
<td>7.46</td>
<td>8.0</td>
<td>6.58</td>
</tr>
<tr>
<td>8.0</td>
<td>6.95</td>
<td>8.0</td>
<td>8.14</td>
<td>8.0</td>
<td>6.77</td>
<td>8.0</td>
<td>5.76</td>
</tr>
<tr>
<td>13.0</td>
<td>7.58</td>
<td>13.0</td>
<td>8.74</td>
<td>13.0</td>
<td>12.74</td>
<td>8.0</td>
<td>7.71</td>
</tr>
<tr>
<td>9.0</td>
<td>8.81</td>
<td>9.0</td>
<td>8.77</td>
<td>9.0</td>
<td>7.11</td>
<td>8.0</td>
<td>8.84</td>
</tr>
<tr>
<td>11.0</td>
<td>8.33</td>
<td>11.0</td>
<td>9.26</td>
<td>11.0</td>
<td>7.81</td>
<td>8.0</td>
<td>8.47</td>
</tr>
<tr>
<td>14.0</td>
<td>9.96</td>
<td>14.0</td>
<td>8.10</td>
<td>14.0</td>
<td>8.84</td>
<td>8.0</td>
<td>7.04</td>
</tr>
<tr>
<td>6.0</td>
<td>7.24</td>
<td>6.0</td>
<td>6.13</td>
<td>6.0</td>
<td>6.08</td>
<td>8.0</td>
<td>5.25</td>
</tr>
<tr>
<td>4.0</td>
<td>4.26</td>
<td>4.0</td>
<td>3.10</td>
<td>4.0</td>
<td>5.39</td>
<td>19.0</td>
<td>12.50</td>
</tr>
<tr>
<td>12.0</td>
<td>10.84</td>
<td>12.0</td>
<td>9.13</td>
<td>12.0</td>
<td>8.15</td>
<td>8.0</td>
<td>5.56</td>
</tr>
<tr>
<td>7.0</td>
<td>4.82</td>
<td>7.0</td>
<td>7.26</td>
<td>7.0</td>
<td>6.42</td>
<td>8.0</td>
<td>7.91</td>
</tr>
<tr>
<td>5.0</td>
<td>5.68</td>
<td>5.0</td>
<td>4.74</td>
<td>5.0</td>
<td>5.73</td>
<td>8.0</td>
<td>6.89</td>
</tr>
</tbody>
</table>
<p>What sense can we make of this?</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="13" lang="en-US">
2024-09-26 04:41:41 +00:00
<table>
<thead>
<tr>
<th></th>
<th>Sample 1</th>
<th>Sample 2</th>
<th>Sample 3</th>
<th>Sample 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Mean of x</td>
<td>9</td>
<td>9</td>
<td>9</td>
<td>9</td>
</tr>
<tr>
<td>Variance of x</td>
<td>11</td>
<td>11</td>
<td>11</td>
<td>11</td>
</tr>
<tr>
<td>Mean of y</td>
<td>7.50</td>
<td>7.50</td>
<td>7.50</td>
<td>7.50</td>
</tr>
<tr>
<td>Variance of y (±0.003 )</td>
<td>4.125</td>
<td>4.125</td>
<td>4.125</td>
<td>4.125</td>
</tr>
<tr>
<td>Correlation x &amp; y</td>
<td>0.816</td>
<td>0.816</td>
<td>0.816</td>
<td>0.816</td>
</tr>
<tr>
<td>Linear Regression</td>
<td>y = 3.00 + 0.500x</td>
<td>y = 3.00 + 0.500x</td>
<td>y = 3.00 + 0.500x</td>
<td>y = 3.00 + 0.500x</td>
</tr>
<tr>
<td>R² coefficient</td>
<td>0.67</td>
<td>0.67</td>
<td>0.67</td>
<td>0.67</td>
</tr>
</tbody>
</table>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="14" lang="en-US">
2024-09-26 04:41:41 +00:00
<p><img src="anscome.svg" alt="Anscombe's quartet" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="15" lang="en-US">
2024-09-26 04:41:41 +00:00
<p>Our understanding of the data is enhanced by these visualizations in a way summary statistics won't capture.</p>
<p>What things are easier to see?</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="16" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="benefits-of-visualizing-data">Benefits of Visualizing Data</h2>
<ul>
<li>outliers</li>
<li>&quot;shape of data&quot;</li>
<li>clusters</li>
<li><em>intuition</em> and <em>questions</em> - &quot;why is it like that?&quot;</li>
<li>tap into human capacity for pattern recognition</li>
<li>often easier to test theories or models</li>
</ul>
<p><em>exploratory visualization</em></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="17" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="explanatory-visualization">Explanatory Visualization</h2>
<ul>
<li>Highlight interesting findings</li>
<li>Tell a story</li>
<li>Present a thesis</li>
<li>Persuade</li>
<li>Support larger story/argument</li>
<li>Inspire</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="18" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="visualizations-and-policy">Visualizations and Policy</h2>
<p>Visualizations have an outsized influence on human cognition, we seem to trust images more than words.</p>
<p>This means that visualizations can be used to <strong>persuade</strong>, but also <strong>mislead</strong>.</p>
<p>There does not need to be intention, we can easily deceive ourselves without realizing it.</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="19" lang="en-US">
2024-09-26 04:41:41 +00:00
<p><img src="rockets_chart.png" alt="" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;challenger.jpg&quot;);"></figure><figure style="background-image:url(&quot;feynman.jpg&quot;);"></figure></div></section></foreignObject><foreignObject width="1280" height="720"><section id="20" lang="en-US" data-marpit-advanced-background="content"></section>
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="21" lang="en-US">
2024-09-26 04:41:41 +00:00
<p><img src="cholera.jpg" alt="" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="22" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="data-visualization-for-policy-analysis">Data Visualization for Policy Analysis</h2>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="23" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="course-goals">Course Goals</h2>
<ul>
<li>Understand &amp; appreciate what makes a good data visualization.</li>
<li>Learn practical visualization techniques that will apply in any language &amp; library.</li>
<li>Build a portfolio of static &amp; interactive visualizations using real-world policy data.</li>
<li>Gain exposure to useful libraries in Python and JavaScript.</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="24" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="topics">Topics</h2>
<ul>
<li>Fundamentals, Grammar of Graphics</li>
<li>Design principles. How to use color, human perception, chart design.</li>
<li>How to evaluate and critique visualizations.</li>
<li>Uncertainty &amp; Narrative</li>
<li>HTML/CSS/JS overview</li>
<li>D3.js</li>
<li>Interactive &amp; non-chart data visualization.</li>
<li>Geospatial visualization</li>
<li>Special Topics: to be discussed</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="25" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="programming-workload">Programming Workload</h2>
<p>Key Idea: You get better at visualizations by making <em>a lot</em> of them. (20-30 this quarter)</p>
<ul>
<li>Expect to write code every week, mostly fairly short Python functions.</li>
<li>You will be learning at least one library (Altair) mostly independently.</li>
<li>You'll also need to be comfortable with <code>pandas</code> or <code>polars</code>.</li>
</ul>
<h3 id="javascript-and-d3">JavaScript and D3</h3>
<p><em>&quot;You aren't going to make them learn D3 are you?&quot;</em></p>
<ul>
<li>1 Assignment</li>
<li>1-2 Lectures</li>
</ul>
<p>Final project will have a place where D3 will be helpful, but other options will be presented.</p>
<p>After introductory lecture, some examples will continue to be in D3, but you will not need to understand their inner workings.</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="26" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="course-structure">Course Structure</h2>
<ul>
<li><strong>Lecture and Discussion</strong>: Introduce and explore key concepts, mostly focused on theory.</li>
<li><strong>Readings</strong>: Supplement course materials with more examples, technical tutorials.</li>
<li><strong>2 &quot;minor&quot; assignments: Altair &amp; D3</strong> - Gain practice with commonly used tools in a structured setting.</li>
<li><strong>Projects</strong>: Learn to explore a topic on your own from conception to practice. Leave here with a portfolio you can show off.</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="27" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="course-staff">Course Staff</h2>
<ul>
<li>James Turk</li>
2024-09-27 19:26:52 +00:00
<li>Krisha Mehta</li>
<li>Sam Huang</li>
2024-09-26 04:41:41 +00:00
</ul>
2024-09-27 19:26:52 +00:00
<p><strong>All official information will be on the course site and/or Ed.</strong></p>
2024-09-26 04:41:41 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="28" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="projects">Projects</h2>
<table>
<thead>
<tr>
<th></th>
<th>Static</th>
<th>Interactive</th>
</tr>
</thead>
<tbody>
<tr>
<td>Proposal</td>
<td>Week 1</td>
<td>Week 6</td>
</tr>
<tr>
<td>Feedback Draft</td>
<td>Week 3</td>
<td>Week 8</td>
</tr>
<tr>
<td>Peer Critique</td>
<td>Week 4</td>
<td>Week 9</td>
</tr>
<tr>
<td>Final</td>
<td>Week 5</td>
<td>Week 10</td>
</tr>
</tbody>
</table>
<h2 id="practice-assignments">Practice Assignments</h2>
<ul>
<li>Altair (Week 2)</li>
<li>D3 (Week 6)</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="29" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="grading">Grading</h2>
<p>15 SNU grades</p>
<p><strong>Completion:</strong> 9 (2x Proposals, Drafts &amp; Critiques + 2 Labs + 1 Participation)</p>
<p><strong>Quality Grades:</strong> 6 (2x Design, Narrative, Code Quality)</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="30" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="ai-policy">AI Policy</h2>
<p>In this course, all usage of generative AI must be <em>fully cited</em>.</p>
<p>Details on specific rules: <a href="https://capp30239.netlify.app/policies/ai/">https://capp30239.netlify.app/policies/ai/</a></p>
<p>You are, as always, expected to turn in <strong>your own work</strong>, not the work of an LLM.</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="31" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="static-visualization-project">Static Visualization Project</h2>
<p><a href="https://capp30239.netlify.app/coursework/static/">https://capp30239.netlify.app/coursework/static/</a></p>
<p><strong>End Product</strong></p>
<p>Using real data of your choosing:</p>
<ul>
<li>8-12 distinct images, of at least 5 different types.</li>
<li>Presented as part of a <strong>narrative</strong>: an article, infographic, poster.</li>
<li>Cohesive visual design: custom theme for graphs, matching colors and fonts with supplementary material.</li>
</ul>
<p>Use of Altair is <strong>strongly</strong> recommended, but other libraries allowed.</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="32" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="examples">Examples</h2>
<p><a href="https://capp-30239-winter-2021.netlify.app/#staticShowcase">https://capp-30239-winter-2021.netlify.app/#staticShowcase</a></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="33" lang="en-US">
2024-09-26 04:41:41 +00:00
<h2 id="milestones">Milestones</h2>
<ul>
<li>Milestone 1 (Week 1): Draft proposal.</li>
<li>Milestone 2 (Week 3): Draft of 8 visualizations for review &amp; critique.</li>
<li>Milestone 3 (Week 4): Peer Critique</li>
<li>Milestone 4 (Week 5): Final Deliverable</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="34" lang="en-US">
2024-09-28 21:18:20 +00:00
<h2 id="acknowledgements--references">Acknowledgements &amp; References</h2>
2024-09-26 04:41:41 +00:00
<p>Thanks to Alex Hale, Andrew McNutt, and Jessica Hullman for sharing their materials.</p>
<p><a href="https://hdsr.mitpress.mit.edu/pub/zok97i7p/release/4">Why Is Data Visualization Important? What Is Important in Data Visualization?</a> - An tony Unwin</p>
</section>
2024-11-13 23:50:35 +00:00
<script>!function(){"use strict";const t={h1:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"1"},style:"display: block; font-size: 2em; margin-block-start: 0.67em; margin-block-end: 0.67em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h2:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"2"},style:"display: block; font-size: 1.5em; margin-block-start: 0.83em; margin-block-end: 0.83em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h3:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"3"},style:"display: block; font-size: 1.17em; margin-block-start: 1em; margin-block-end: 1em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h4:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"4"},style:"display: block; margin-block-start: 1.33em; margin-block-end: 1.33em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h5:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"5"},style:"display: block; font-size: 0.83em; margin-block-start: 1.67em; margin-block-end: 1.67em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h6:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"6"},style:"display: block; font-size: 0.67em; margin-block-start: 2.33em; margin-block-end: 2.33em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},span:{proto:()=>HTMLSpanElement},pre:{proto:()=>HTMLElement,style:"display: block; font-family: monospace; white-space: pre; margin: 1em 0; --marp-auto-scaling-white-space: pre;"}},e="data-marp-auto-scaling-wrapper",i="data-marp-auto-scaling-svg",n="data-marp-auto-scaling-container";class s extends HTMLElement{container;containerSize;containerObserver;svg;svgComputedStyle;svgPreserveAspectRatio="xMinYMid meet";wrapper;wrapperSize;wrapperObserver;constructor(){super();const t=t=>([e])=>{const{width:i,height:n}=e.contentRect;this[t]={width:i,height:n},this.updateSVGRect()};this.attachShadow({mode:"open"}),this.containerObserver=new ResizeObserver(t("containerSize")),this.wrapperObserver=new ResizeObserver(((...e)=>{t("wrapperSize")(...e),this.flushSvgDisplay()}))}static get observedAttributes(){return["data-downscale-only"]}connectedCallback(){this.shadowRoot.innerHTML=`\n<style>\n svg[${i}] { display: block; width: 100%; height: auto; vertical-align: top; }\n span[${n}] { display: table; white-space: var(--marp-auto-scaling-white-space, nowrap); width: max-content; }\n</style>\n<div ${e}>\n <svg part="svg" ${i}>\n <foreignObject><span ${n}><slot></slot></span></foreignObject>\n </svg>\n</div>\n `.split(/\n\s*/).join(""),this.wrapper=this.shadowRoot.querySelector(`div[${e}]`)??void 0;const t=this.svg;this.svg=this.wrapper?.querySelector(`svg[${i}]`)??void 0,this.svg!==t&&(this.svgComputedStyle=this.svg?window.getComputedStyle(this.svg):void 0),this.container=this.svg?.querySelector(`span[${n}]`)??void 0,this.observe()}disconnectedCallback(){this.svg=void 0,this.svgComputedStyle=void 0,this.wrapper=void 0,this.container=void 0,this.observe()}attributeChangedCallback(){this.observe()}flushSvgDisplay(){const{svg:t}=this;t&&(t.style.display="inline",requestAnimationFrame((()=>{t.style.display=""})))}observe(){this.containerObserver.disconnect(),this.wrapperObserver.disconnect(),this.wrapper&&this.wrapperObserver.observe(this.wrapper),this.container&&this.containerObserver.observe(this.container),this.svgComputedStyle&&this.observeSVGStyle(this.svgComputedStyle)}observeSVGStyle(t){const e=()=>{const i=(()=>{const e=t.getPropertyValue("--preserve-aspect-ratio");if(e)return e.trim();return`x${(({textAlign:t,direction:e})=>{if(t.endsWith("left"))return"Min";if(t.endsWith("right"))return"Max";if("start"===t||"end"===t){let i="rtl"===e;return"end"===t&&(i=!i),i?"Max":"Min"}return"Mid"})(t)}YMid meet`})();i!==this.svgPreserveAspectRatio&&(this.svgPreserveAspectRatio=i,this.updateSVGRect()),t===this.svgComputedStyle&&requestAnimationFrame(e)};e()}updateSVGRect(){let t=Math.ceil(this.containerSize?.w
2024-09-26 04:41:41 +00:00
</script></foreignObject></svg></div><div class="bespoke-marp-note" data-index="2" tabindex="0"><p>Modern data visualization is largely a product of the sheer amount of data we produce.</p></div><div class="bespoke-marp-note" data-index="3" tabindex="0"><p>In part this is a function of the digitization of most of our lives.
15 years ago there was no data.gov, it has added 300k data sets since then.</p></div><div class="bespoke-marp-note" data-index="4" tabindex="0"><p>As technology advances, our data gets to be incredibly fine grained.
2024-09-27 19:26:52 +00:00
This is a sample of ride share rides over a six year period. Each pixel is a pick up or drop off.</p></div><div class="bespoke-marp-note" data-index="18" tabindex="0"><p>images from presentation on O-ring temperature anomaly</p></div><div class="bespoke-marp-note" data-index="19" tabindex="0"><p>the result</p></div><div class="bespoke-marp-note" data-index="20" tabindex="0"><p>Cholera outbreak. London, 1854. John Snow.</p></div><div class="bespoke-marp-note" data-index="24" tabindex="0"><p>It has however, become a &quot;library's library&quot; in some ways. Most developers interact with D3 through a higher-level interface.
2024-09-26 04:41:41 +00:00
We will be learning Altair, which generates Vega JSON, which in turn is drawn using D3.
D3 underpins dozens of other charting libraries as well, and D3's own documentation says:
D3 makes things possible, not necessarily easy; even simple things that should be easy are often not. To paraphrase Amanda Cox: “Use D3 if you think its perfectly normal to write a hundred lines of code for a bar chart.”
Learning D3 both requires working in an unfamiliar environment (JavaScript) and with a very unique style of programming based around their concept of the [&quot;data join&quot;](https://d3js.org/d3-selection/joining), which requires a decent understanding of the HTML Document Object Model.
2024-11-13 23:50:35 +00:00
So, if you are here to learn visualization, I think that it is fair that you can succeed in this class without putting yourself through that.</p></div><script>/*!! License: https://unpkg.com/@marp-team/marp-cli@4.0.3/lib/bespoke.js.LICENSE.txt */
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,n,r=(n||(n=1,t={from:function(e,t){var n,r=1===(e.parent||e).nodeType?e.parent||e:document.querySelector(e.parent||e),o=[].filter.call("string"==typeof e.slides?r.querySelectorAll(e.slides):e.slides||r.children,(function(e){return"SCRIPT"!==e.nodeName})),a={},i=function(e,t){return(t=t||{}).index=o.indexOf(e),t.slide=e,t},s=function(e,t){a[e]=(a[e]||[]).filter((function(e){return e!==t}))},c=function(e,t){return(a[e]||[]).reduce((function(e,n){return e&&!1!==n(t)}),!0)},l=function(e,t){o[e]&&(n&&c("deactivate",i(n,t)),n=o[e],c("activate",i(n,t)))},d=function(e,t){var r=o.indexOf(n)+e;c(e>0?"next":"prev",i(n,t))&&l(r,t)},u={off:s,on:function(e,t){return(a[e]||(a[e]=[])).push(t),s.bind(null,e,t)},fire:c,slide:function(e,t){if(!arguments.length)return o.indexOf(n);c("slide",i(o[e],t))&&l(e,t)},next:d.bind(null,1),prev:d.bind(null,-1),parent:r,slides:o,destroy:function(e){c("destroy",i(n,e)),a={}}};return(t||[]).forEach((function(e){e(u)})),n||l(0),u}}),t),o=e(r);const a=document.body,i=(...e)=>history.replaceState(...e),s="",c="presenter",l="next",d=["",c,l],u="bespoke-marp-",f=`data-${u}`,m=(e,{protocol:t,host:n,pathname:r,hash:o}=location)=>{const a=e.toString();return`${t}//${n}${r}${a?"?":""}${a}${o}`},g=()=>a.dataset.bespokeView,p=e=>new URLSearchParams(location.search).get(e),v=(e,t={})=>{const n={location,setter:i,...t},r=new URLSearchParams(n.location.search);for(const t of Object.keys(e)){const n=e[t];"string"==typeof n?r.set(t,n):r.delete(t)}try{n.setter({...window.history.state??{}},"",m(r,n.location))}catch(e){console.error(e)}},h=(()=>{const e="bespoke-marp";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}})(),y=e=>{try{return localStorage.getItem(e)}catch{return null}},b=(e,t)=>{try{return localStorage.setItem(e,t),!0}catch{return!1}},w=e=>{try{return localStorage.removeItem(e),!0}catch{return!1}},x=(e,t)=>{const n="aria-hidden";t?e.setAttribute(n,"true"):e.removeAttribute(n)},k=e=>{e.parent.classList.add(`${u}parent`),e.slides.forEach((e=>e.classList.add(`${u}slide`))),e.on("activate",(t=>{const n=`${u}active`,r=t.slide,o=r.classList,a=!o.contains(n);if(e.slides.forEach((e=>{e.classList.remove(n),x(e,!0)})),o.add(n),x(r,!1),a){const e=`${n}-ready`;o.add(e),document.body.clientHeight,o.remove(e)}}))},$=e=>{let t=0,n=0;Object.defineProperty(e,"fragments",{enumerable:!0,value:e.slides.map((e=>[null,...e.querySelectorAll("[data-marpit-fragment]")]))});const r=r=>void 0!==e.fragments[t][n+r],o=(r,o)=>{t=r,n=o,e.fragments.forEach(((e,t)=>{e.forEach(((e,n)=>{if(null==e)return;const a=t<r||t===r&&n<=o;e.setAttribute(`${f}fragment`,(a?"":"in")+"active");const i=`${f}current-fragment`;t===r&&n===o?e.setAttribute(i,"current"):e.removeAttribute(i)}))})),e.fragmentIndex=o;const a={slide:e.slides[r],index:r,fragments:e.fragments[r],fragmentIndex:o};e.fire("fragment",a)};e.on("next",(({fragment:a=!0})=>{if(a){if(r(1))return o(t,n+1),!1;const a=t+1;e.fragments[a]&&o(a,0)}else{const r=e.fragments[t].length;if(n+1<r)return o(t,r-1),!1;const a=e.fragments[t+1];a&&o(t+1,a.length-1)}})),e.on("prev",(({fragment:a=!0})=>{if(r(-1)&&a)return o(t,n-1),!1;const i=t-1;e.fragments[i]&&o(i,e.fragments[i].length-1)})),e.on("slide",(({index:t,fragment:n})=>{let r=0;if(void 0!==n){const o=e.fragments[t];if(o){const{length:e}=o;r=-1===n?e-1:Math.min(Math.max(n,0),e-1)}}o(t,r)})),o(0,0)},E=document,L=()=>!(!E.fullscreenEnabled&&!E.webkitFullscreenEnabled),S=()=>!(!E.fullscreenElement&&!E.webkitFullscreenElement),P=e=>{e.fullscreen=()=>{L()&&(async()=>{S()?(E.exitFullscreen||E.webkitExitFullscreen)?.call(E):((e=E.body)=>{(e.requestFullscreen||e.webkitRequestFullscreen)?.call(e)})()})()},document.addEventListener("keydown",(t=>{"f"!==t.key&&"F11"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!L()||(e.fullscreen(),t.preventDefault())}))},_=`${u}inactive`,T=(e=2e3)=>({parent:t,fire:n})=>{const r=t.classList,o=e=>n(`marp-${e?"":"in"}active`);let a;const i=()=>{a&&clearTimeout(a),a=setTimeou