PageSourceSearch

https://soci-269-w9.netlify.app/

html soci-269-w9.netlify.app collected 2026-10-03 11:25:26 UTC 64,298 bytes, 1,228 lines download raw bytes

1<!DOCTYPE html>
2<html lang="en"><head>
3<script src="index_files/libs/clipboard/clipboard.min.js"></script>
vendor: 1 bytes, line 3
3
4<script src="index_files/libs/quarto-html/tabby.min.js"></script>
vendor: 1 bytes, line 4
4
5<script src="index_files/libs/quarto-html/popper.min.js"></script>
vendor: 1 bytes, line 5
5
6<script src="index_files/libs/quarto-html/tippy.umd.min.js"></script>
6
7<link href="index_files/libs/quarto-html/tippy.css" rel="stylesheet">
8<link href="index_files/libs/quarto-html/light-border.css" rel="stylesheet">
9<link href="index_files/libs/quarto-html/quarto-syntax-highlighting-59898bd1c6b9d2bb783127feaa000c76.css" rel="stylesheet" id="quarto-text-highlighting-styles">
10<link href="index_files/libs/quarto-contrib/fontawesome6-0.1.0/all.css" rel="stylesheet">
11<link href="index_files/libs/quarto-contrib/fontawesome6-0.1.0/latex-fontsize.css" rel="stylesheet">
12<script src="index_files/libs/quarto-contrib/glightbox/glightbox.min.js"></script>
12
13<link href="index_files/libs/quarto-contrib/glightbox/glightbox.min.css" rel="stylesheet">
14<link href="index_files/libs/quarto-contrib/glightbox/lightbox.css" rel="stylesheet"><meta charset="utf-8">
15  <meta name="generator" content="quarto-1.7.33">
16
17  <meta name="author" content="Sakeef M. Karim  Amherst College     AN INTRODUCTION TO QUANTITATIVE SOCIOLOGY—CULTURE &amp; POWER">
18  <title>Lecture 9 for SOCI—269 at Amherst College</title>
19  <meta name="apple-mobile-web-app-capable" content="yes">
20  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
21  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
22  <link rel="stylesheet" href="index_files/libs/revealjs/dist/reset.css">
23  <link rel="stylesheet" href="index_files/libs/revealjs/dist/reveal.css">
24  <style>
25    code{white-space: pre-wrap;}
26    span.smallcaps{font-variant: small-caps;}
27    div.columns{display: flex; gap: min(4vw, 1.5em);}
28    div.column{flex: auto; overflow-x: auto;}
29    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
30    ul.task-list{list-style: none;}
31    ul.task-list li input[type="checkbox"] {
32      width: 0.8em;
33      margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ 
34      vertical-align: middle;
35    }
36    /* CSS for syntax highlighting */
37    html { -webkit-text-size-adjust: 100%; }
38    pre > code.sourceCode { white-space: pre; position: relative; }
39    pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
40    pre > code.sourceCode > span:empty { height: 1.2em; }
41    .sourceCode { overflow: visible; }
42    code.sourceCode > span { color: inherit; text-decoration: inherit; }
43    div.sourceCode { margin: 1em 0; }
44    pre.sourceCode { margin: 0; }
45    @media screen {
46    div.sourceCode { overflow: auto; }
47    }
48    @media print {
49    pre > code.sourceCode { white-space: pre-wrap; }
50    pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
51    }
52    pre.numberSource code
53      { counter-reset: source-line 0; }
54    pre.numberSource code > span
55      { position: relative; left: -4em; counter-increment: source-line; }
56    pre.numberSource code > span > a:first-child::before
57      { content: counter(source-line);
58        position: relative; left: -1em; text-align: right; vertical-align: baseline;
59        border: none; display: inline-block;
60        -webkit-touch-callout: none; -webkit-user-select: none;
61        -khtml-user-select: none; -moz-user-select: none;
62        -ms-user-select: none; user-select: none;
63        padding: 0 4px; width: 4em;
64      }
65    pre.numberSource { margin-left: 3em;  padding-left: 4px; }
66    div.sourceCode
67      { color: #24292e;  }
68    @media screen {
69    pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
70    }
71    code span { color: #24292e; } /* Normal */
72    code span.al { color: #ff5555; font-weight: bold; } /* Alert */
73    code span.an { color: #6a737d; } /* Annotation */
74    code span.at { color: #d73a49; } /* Attribute */
75    code span.bn { color: #005cc5; } /* BaseN */
76    code span.bu { color: #d73a49; } /* BuiltIn */
77    code span.cf { color: #d73a49; } /* ControlFlow */
78    code span.ch { color: #032f62; } /* Char */
79    code span.cn { color: #005cc5; } /* Constant */
80    code span.co { color: #6a737d; } /* Comment */
81    code span.cv { color: #6a737d; } /* CommentVar */
82    code span.do { color: #6a737d; } /* Documentation */
83    code span.dt { color: #d73a49; } /* DataType */
84    code span.dv { color: #005cc5; } /* DecVal */
85    code span.er { color: #ff5555; text-decoration: underline; } /* Error */
86    code span.ex { color: #d73a49; font-weight: bold; } /* Extension */
87    code span.fl { color: #005cc5; } /* Float */
88    code span.fu { color: #6f42c1; } /* Function */
89    code span.im { color: #032f62; } /* Import */
90    code span.in { color: #6a737d; } /* Information */
91    code span.kw { color: #d73a49; } /* Keyword */
92    code span.op { color: #24292e; } /* Operator */
93    code span.ot { color: #6f42c1; } /* Other */
94    code span.pp { color: #d73a49; } /* Preprocessor */
95    code span.re { color: #6a737d; } /* RegionMarker */
96    code span.sc { color: #005cc5; } /* SpecialChar */
97    code span.ss { color: #032f62; } /* SpecialString */
98    code span.st { color: #032f62; } /* String */
99    code span.va { color: #e36209; } /* Variable */
100    code span.vs { color: #032f62; } /* VerbatimString */
101    code span.wa { color: #ff5555; } /* Warning */
102    /* CSS for citations */
103    div.csl-bib-body { }
104    div.csl-entry {
105      clear: both;
106    }
107    .hanging-indent div.csl-entry {
108      margin-left:2em;
109      text-indent:-2em;
110    }
111    div.csl-left-margin {
112      min-width:2em;
113      float:left;
114    }
115    div.csl-right-inline {
116      margin-left:2em;
117      padding-left:1em;
118    }
119    div.csl-indent {
120      margin-left: 2em;
121    }  </style>
122  <link rel="stylesheet" href="index_files/libs/revealjs/dist/theme/quarto-75f88f5d20d6a8d197d21e55a5857f44.css">
123  <link rel="stylesheet" href="logo.css">
124  <link href="index_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.css" rel="stylesheet">
125  <link href="index_files/libs/revealjs/plugin/reveal-menu/menu.css" rel="stylesheet">
126  <link href="index_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css" rel="stylesheet">
127  <link href="index_files/libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/all.css" rel="stylesheet">
128  <link href="index_files/libs/revealjs/plugin/reveal-chalkboard/style.css" rel="stylesheet">
129  <link href="index_files/libs/revealjs/plugin/reveal-attribution/attribution.css" rel="stylesheet">
130  <link href="index_files/libs/revealjs/plugin/simplemenu/simplemenu.css" rel="stylesheet">
131  <link href="index_files/libs/revealjs/plugin/quarto-support/footer.css" rel="stylesheet">
132  <style type="text/css">
133    .reveal div.sourceCode {
134      margin: 0;
135      overflow: auto;
136    }
137    .reveal div.hanging-indent {
138      margin-left: 1em;
139      text-indent: -1em;
140    }
141    .reveal .slide:not(.center) {
142      height: 100%;
143      overflow-y: auto;
144    }
145    .reveal .slide.scrollable {
146      overflow-y: auto;
147    }
148    .reveal .footnotes {
149      height: 100%;
150      overflow-y: auto;
151    }
152    .reveal .slide .absolute {
153      position: absolute;
154      display: block;
155    }
156    .reveal .footnotes ol {
157      counter-reset: ol;
158      list-style-type: none; 
159      margin-left: 0;
160    }
161    .reveal .footnotes ol li:before {
162      counter-increment: ol;
163      content: counter(ol) ". "; 
164    }
165    .reveal .footnotes ol li > p:first-child {
166      display: inline-block;
167    }
168    .reveal .slide ul,
169    .reveal .slide ol {
170      margin-bottom: 0.5em;
171    }
172    .reveal .slide ul li,
173    .reveal .slide ol li {
174      margin-top: 0.4em;
175      margin-bottom: 0.2em;
176    }
177    .reveal .slide ul[role="tablist"] li {
178      margin-bottom: 0;
179    }
180    .reveal .slide ul li > *:first-child,
181    .reveal .slide ol li > *:first-child {
182      margin-block-start: 0;
183    }
184    .reveal .slide ul li > *:last-child,
185    .reveal .slide ol li > *:last-child {
186      margin-block-end: 0;
187    }
188    .reveal .slide .columns:nth-child(3) {
189      margin-block-start: 0.8em;
190    }
191    .reveal blockquote {
192      box-shadow: none;
193    }
194    .reveal .tippy-content>* {
195      margin-top: 0.2em;
196      margin-bottom: 0.7em;
197    }
198    .reveal .tippy-content>*:last-child {
199      margin-bottom: 0.2em;
200    }
201    .reveal .slide > img.stretch.quarto-figure-center,
202    .reveal .slide > img.r-stretch.quarto-figure-center {
203      display: block;
204      margin-left: auto;
205      margin-right: auto; 
206    }
207    .reveal .slide > img.stretch.quarto-figure-left,
208    .reveal .slide > img.r-stretch.quarto-figure-left  {
209      display: block;
210      margin-left: 0;
211      margin-right: auto; 
212    }
213    .reveal .slide > img.stretch.quarto-figure-right,
214    .reveal .slide > img.r-stretch.quarto-figure-right  {
215      display: block;
216      margin-left: auto;
217      margin-right: 0; 
218    }
219  </style>
220  
220<script src="index_files/libs/core-js-2.5.3/shim.min.js"></script>
220
221  
221<script src="index_files/libs/react-18.2.0/react.min.js"></script>
221
222  
222<script src="index_files/libs/react-18.2.0/react-dom.min.js"></script>
222
223  
223<script src="index_files/libs/reactwidget-2.0.0/react-tools.js"></script>
223
224  <link href="index_files/libs/htmltools-fill-0.5.8.1/fill.css" rel="stylesheet">
225  
225<script src="index_files/libs/htmlwidgets-1.6.4/htmlwidgets.js"></script>
225
226  <link href="index_files/libs/reactable-0.4.4/reactable.css" rel="stylesheet">
227  
227<script src="index_files/libs/reactable-binding-0.4.4/reactable.js"></script>
227
228  <link rel="icon" type="media/png" href="media/line-chart.png">
229                 <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
230</head>
231<body class="quarto-light">
232  <div class="reveal">
233    <div class="slides">
234
235<section id="title-slide" class="quarto-title-block center">
236  <h1 class="title"><p><span style="color:#a9a9a9;">Week 9</span><br>
237More <code>ggplot2</code></p></h1>
238  <p class="subtitle"><span style="color:#9c9c9c; font-family: Dynalight; font-size: 130%;">Soci—269</span></p>
239
240<div class="quarto-title-authors">
241<div class="quarto-title-author">
242<div class="quarto-title-author-name">
243Sakeef M. Karim <br><span style="font-size: 80%; color:#9c9c9c;"><em>Amherst College</em></span><br><a href="https://www.sakeefkarim.com" class="external" target="_blank"><svg aria-hidden="true" role="img" viewbox="0 0 512 512" style="height:1em;width:1em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#5d3c85;overflow:visible;position:relative;"><path d="M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"></path></svg></a> <a href="mailto:[email protected]"><svg aria-hidden="true" role="img" viewbox="0 0 512 512" style="height:1em;width:1em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#5d3c85;overflow:visible;position:relative;"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"></path></svg></a> <br> <span style="font-weight: 300; font-size: 60%; color: #9c9c9c;">AN INTRODUCTION TO QUANTITATIVE SOCIOLOGY—CULTURE &amp; POWER</span> 
244</div>
245</div>
246</div>
247
248</section>
249<section>
250<section id="mapping-with-ggplot2-october-27th" class="title-slide slide level1 center" data-background-color="#43464B">
251<h1>Mapping with <span class="white-text"><code>ggplot2</code></span>—<br>October 27<span style="font-size: 70%;"><sup>th</sup></span></h1>
252
253</section>
254<section id="reminders" class="slide level2">
255<h2>Reminders</h2>
256<h4 id="the-cummings-lecture"><span style="color:#a9a9a9;">The Cummings Lecture</span></h4>
257<div class="centre-aligned-div" style="font-size: 90%;">
258<div class="fragment">
259<p>Title</p>
260<p><span style="color: white; background-color: #5d3c85; padding: 1px 5px; border: 0.001px solid white; border-radius: 5px;"><strong><em>Something Between Us</em></strong></span><br><span style="font-size: 80%; font-weight: 400; color: #a9a9a9;"><em>The Everyday Walls of American Life, and How to Take Them Down</em></span></p>
261</div>
262<div class="fragment">
263<p>Description</p>
264<details>
265<summary class="custom-box">
266<span style="font-size:85%;">Click to Expand or Close</span>
267</summary>
268<div style="text-align: center; font-size: 80%;">
269<p><span style="color: #9c9c9c; font-size:95%;">Scroll <span style="color: #5d3c85;"><i class="fa-solid fa-circle-chevron-down" aria-label="circle-chevron-down"></i></span> to access the entire description.</span></p>
270</div>
271<div style="text-align: left;">
272<div class="quote-block">
273<p>In 2016, <a href="https://anand.studio/" class="external" target="_blank">Anand Pandian</a> was alarmed by Donald Trump’s harsh attacks on immigrants to the United States, the appeal of that politics of anger and fear. In the years that followed, he crisscrossed the country seeking out fellow Americans with markedly different social and political commitments, tr
273ying to understand the forces that have hardened our suspicions of others. The result is <span style="color: white; background-color: #5d3c85; padding: 1px 5px; border: 0.001px solid white; border-radius: 5px;"><strong><em>Something Between Us</em></strong></span>, a groundbreaking and ultimately hopeful exploration of the ruptures in our social fabric, and courageous efforts to rebuild a collective life beyond them. Through vivid encounters with Americans of many kinds, Pandian shares tools to think beyond the twists and turns of our bracing present.</p>
274</div>
275</div>
276</details>
277</div>
278<div class="fragment">
279<p>Date and Time</p>
280<p><a href="https://www.amherst.edu/mm_calendar_ical/932382/event.ics" class="noicons"><i class="fa-solid fa-clock" aria-label="clock"></i> &nbsp; Tonight — 5:00 PM to 6:30 PM</a></p>
281</div>
282<div class="fragment">
283<p>Location</p>
284<p><a href="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d5895.306868906522!2d-72.52020499999999!3d42.3712246!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89e6cdf87418b433%3A0xeb2f42e1dc01a62f!2s197%20S%20Pleasant%20St%2C%20Amherst%2C%20MA%2001002!5e0!3m2!1sen!2sus!4v1731186575957!5m2!1sen!2sus" data-preview-link="true"><i class="fa-solid fa-location-dot" aria-label="location-dot"></i> &nbsp; CHI Think Tank (101) at the Lyceum</a></p>
285</div>
286</div>
287</section>
288<section id="reminders-1" class="slide level2">
289<h2>Reminders</h2>
290<h4 id="coding-assignment-in"><span style="color:#9c9c9c;">Coding Assignment in <svg aria-hidden="true" role="img" viewbox="0 0 581 512" style="height:1em;width:1.13em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#5d3c85;overflow:visible;position:relative;"><path d="M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z"></path></svg></span></h4>
291<div style="margin-top: 90px; text-align: center;">
292<div class="callout callout-important callout-titled callout-style-default">
293<div class="callout-body">
294<div class="callout-title">
295<div class="callout-icon-container">
296<i class="callout-icon"></i>
297</div>
298<p><strong>Coding Assignment Deadline</strong></p>
299</div>
300<div class="callout-content">
301<p>Your first coding assignment is due by <span style="color: white; background-color: #5d3c85; padding: 1px 5px; border: 0.001px solid white; border-radius: 5px;"><strong>8:00 PM</strong> on Tuesday, November 4<span style="font-size: 70%;"><sup>th</sup></span></span>.</p>
302</div>
303</div>
304</div>
305</div>
306</section>
307<section id="reminders-2" class="slide level2">
308<h2>Reminders</h2>
309<h4 id="coding-assignment-in-1"><span style="color:#9c9c9c;">Coding Assignment in <svg aria-hidden="true" role="img" viewbox="0 0 581 512" style="height:1em;width:1.13em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#5d3c85;overflow:visible;position:relative;"><path d="M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z"></path></svg></span></h4>
310<div style="text-align: center; margin-top: 25px;">
311<p>Assignment instructions are available online.</p>
312<p align="center">
313<iframe class="iframe" src="https://soci-269-a1.netlify.app/" height="450" width="1040" style="border: 1px solid #2e3846;">
314</iframe>
315</p>
316<div style="text-align: center; font-size: 80%; margin-top:-40px">
317<p><a href="https://soci-269-a1.netlify.app/" data-preview-link="true">Full Page</a></p>
318</div>
319</div>
320</section></section>
321<section>
322<section id="todays-preliminaries" class="title-slide slide level1 center" data-background-color="#43464B">
323<h1>Today’s Preliminaries</h1>
324
325</section>
326<section id="todays-packages" class="slide level2">
327<h2>Today’s Packages</h2>
328<div style="text-align: center; margin-top: 60px; font-size: 105%;">
329<p>Launch <span style="color: #5d3c85;"><strong>RStudio</strong></span> and run the following code:</p>
330<div class="cell">
331<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href=""></a><span class="co">
331# NEW PACKAGES ------------------------------------------------------------</span></span>
332<span id="cb1-2"><a href=""></a></span>
333<span id="cb1-3"><a href=""></a>week9_1 <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">"scales"</span>, <span class="st">"patchwork"</span>, <span class="st">"htmltools"</span>,  <span class="st">"leafpop"</span>, <span class="st">"leaflet"</span>, </span>
334<span id="cb1-4"><a href=""></a>             <span class="st">"mapview"</span>, <span class="st">"usmapdata"</span>, <span class="st">"usmap"</span>, <span class="st">"mapcan"</span>, <span class="st">"cancensus"</span>,</span>
335<span id="cb1-5"><a href=""></a>             <span class="st">"tidycensus"</span>,  <span class="st">"geojsonsf"</span>, <span class="st">"tidygeocoder"</span>,  </span>
336<span id="cb1-6"><a href=""></a>             <span class="st">"rnaturalearthdata"</span>, <span class="st">"rnaturalearth"</span>, <span class="st">"ggspatial"</span>, </span>
337<span id="cb1-7"><a href=""></a>             <span class="st">"terra"</span>, <span class="st">"sp"</span>, <span class="st">"sf"</span>, <span class="st">"gt"</span>, <span class="st">"colorspace"</span>)</span>
338<span id="cb1-8"><a href=""></a></span>
339<span id="cb1-9"><a href=""></a><span class="fu">install.packages</span>(week9_1)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
340</div>
341<p>Give me a <span style="color: #5d3c85;"><i class="fa-solid fa-thumbs-up" aria-label="thumbs-up"></i></span> when all the packages have been installed.</p>
342</div>
343</section>
344<section id="todays-script-file" class="slide level2">
345<h2>Today’s Script File</h2>
346<div style="text-align: center; margin-top: 40px; font-size: 105%;">
347<p>You can access today’s script file here.</p>
348<p align="center">
349<iframe class="iframe" src="data/week9_1.R" height="400" width="800" style="border: 1px solid #2e3846;">
350</iframe>
351</p>
352<div style="text-align: center; font-size: 90%; margin-top:-40px">
353<p><a href="./data/week9_1.R">Download <i class="fa-solid fa-download" aria-label="download"></i></a></p>
354</div>
355</div>
356</section>
357<section id="our-data" class="slide level2">
358<h2>Our Data</h2>
359<div style="text-align: center; margin-top: 120px; font-size: 105%;">
360<p>You can access the data for today’s session by<br>executing the following code:</p>
361<div class="cell">
362<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb2-1"><a href=""></a><span class="fu">load</span>(<span class="fu">url</span>(<span class="st">"https://github.com/sakeefkarim/soci-269-f25/raw/refs/heads/main/data/week%209/week9.RData"</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
363</div>
364</div>
365</section>
366<section id="our-data-1" class="slide level2">
367<h2>Our Data</h2>
368<div style="margin-top: 40px;">
369
370</div>
371<div class="cell">
372<div class="cell-output-display">
373<div class="reactable html-widget html-fill-item" id="htmlwidget-017d53e103a31905ae00" style="width:auto;height:auto;"></div>
374<script type="application/json" data-for="htmlwidget-017d53e103a31905ae00">{"x":{"tag":{"name":"Reactable","attribs":{"data":{"Dataset":["<code>can_binned_age<\/code>","<code>canada_cd<\/code>","<code>map_data<\/code>","<code>province_territory<\/code>","<code>select_countries<\/code>","<code>amherst_shp<\/code>","<code>london_sf<\/code>"],"Details":["Data on the sex distribution in Canada from 1971 to 2024. Produced using the <a href='https://mountainmath.github.io/cansim/' target='_blank'>cansim<\/a> package.","A GeoJSON file containing Canadian spatial data. Was drawn from Monica Alexander’s <a href='https://github.com/MJAlexander/social_media_workshop' target='_blank'>Social Media Workshop<\/a> repository.","Simple features data frame containing spatial data as well as country-year-level indicators from the <a href='https://vincentarelbundock.github.io/WDI/#/' target='_blank'>WDI<\/a> package.","Spatial and population data on Canadian provinces in 2017. Data comes from the <a href='https://cran.r-project.org/web/packages/mapcan/index.html' target='_blank'>mapcan<\/a> package.","Data on old age dependency and fertility in Canada, the United States, Japan and Germany from 1970 to 2020. Constructed using the <a href='https://vincentarelbundock.github.io/WDI/#/' target='_blank'>WDI<\/a> package.","A shapefile of Amherst drawn from <a href='https://www.amherstma.gov/1432/Get-Amherst-GIS-Data' target='_blank'>here<\/a>.","A simple features data frame of Oxfordshire. Constructed using the <a href='https://ropengov.github.io/eurostat/' target='_blank'>eurostat<\/a> library."]},"columns":[{"id":"Dataset","name":"Dataset","type":"character","html":true,"align":"center"},{"id":"Details","name":"Details","type":"character","html":true}],"filterable":true,"searchable":true,"defaultPageSize":4,"showPageSizeOptions":false,"highlight":true,"theme":{"borderColor":"#dfe2e5","stripedColor":"#f6f8fa","highlightColor":"#ded5eb","style":{"fontSize":"20px"},"searchInputStyle":{"width":"100%"}},"dataKey":"367ea2354ad22dccb7630d8893def83b"},"children":[]},"class":"reactR_markup"},"evals":[],"jsHooks":[]}</script>
374
375</div>
376</div>
377</section>
378<section id="lets-launch-rstudio" class="slide level2">
379<h2>Let’s Launch RStudio</h2>
380<div style="margin-top: 90px; text-align: center;">
381<div class="callout callout-tip callout-titled callout-style-default">
382<div class="callout-body">
383<div class="callout-title">
384<div class="callout-icon-container">
385<i class="callout-icon"></i>
386</div>
387<p><strong>Note</strong></p>
388</div>
389<div class="callout-content">
390<p>The rest of today’s session will take place in <span style="color: #5d3c85;"><strong>RStudio</strong></span>!</p>
391</div>
392</div>
393</div>
394</div>
395</section>
396<section id="extra-map-projections" class="slide level2">
397<h2>Extra: Map Projections</h2>
398<div class="panel-tabset">
399<ul id="tabset-1" class="panel-tabset-tabby"><li><a data-tabby-default="" href="#tabset-1-1">List of Map Projections</a></li><li><a href="#tabset-1-2">Corresponding Code</a></li></ul>
400<div class="tab-content">
401<div id="tabset-1-1">
402<p align="center">
403<iframe class="iframe" src="https://en.wikipedia.org/wiki/List_of_map_projections" height="450" width="1040" style="border: 1px solid #2e3846;">
404</iframe>
405</p>
406<div style="text-align: center; font-size: 80%; margin-top:-40px">
407<p><a href="https://en.wikipedia.org/wiki/List_of_map_projections" data-preview-link="true">Full Page</a></p>
408</div>
409</div>
410<div id="tabset-1-2">
411<p align="center">
412<iframe class="iframe" src="https://epsg.io/" height="450" width="1040" style="border: 1px solid #2e3846;">
413</iframe>
414</p>
415<div style="text-align: center; font-size: 80%; margin-top:-40px">
416<p><a href="https://epsg.io/" data-preview-link="true">Full Page</a></p>
417</div>
418</div>
419</div>
420</div>
421</section></section>
422<section>
423<section id="wrapping-up-module-ii-october-29th" class="title-slide slide level1 center" data-background-color="#43464B">
424<h1>Wrapping Up <span style="font-size: 112%"><span class="white-text"><code>Module II</code></span></span>—<br>October 29<span style="font-size: 70%;"><sup>th</sup></span></h1>
425
426</section>
427<section id="reminders-3" class="slide level2">
428<h2>Reminders</h2>
429<h4 id="coding-assignment-in-2"><span style="color:#9c9c9c;">Coding Assignment in <svg aria-hidden="true" role="img" viewbox="0 0 581 512" style="height:1em;width:1.13em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#5d3c85;overflow:visible;position:relative;"><path d="M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z"></path></svg></span></h4>
430<div style="margin-top: 90px; text-align: center;">
431<div class="callout callout-important callout-titled callout-style-default">
432<div class="callout-body">
433<div class="callout-title">
434<div class="callout-icon-container">
435<i class="callout-icon"></i>
436</div>
437<p><strong>Coding Assignment Deadline</strong></p>
438</div>
439<div class="callout-content">
440<p>Your first coding assignment is due by <span style="color: white; background-color: #5d3c85; padding: 1px 5px; border: 0.001px solid white; border-radius: 5px;"><strong>8:00 PM</strong> on Tuesday, November 4<span style="font-size: 70%;"><sup>th</sup></span></span>.</p>
441</div>
442</div>
443</div>
444</div>
445</section>
446<section id="reminders-4" class="slide level2">
447<h2>Reminders</h2>
448<h4 id="coding-assignment-in-3"><span style="color:#9c9c9c;">Coding Assignment in <svg aria-hidden="true" role="img" viewbox="0 0 581 512" style="height:1em;width:1.13em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#5d3c85;overflow:visible;position:relative;"><path d="M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z"></path></svg></span></h4>
449<div style="text-align: center; margin-top: 25px;">
450<p>Assignment instructions are available online.</p>
451<p align="center">
452<iframe class="iframe" src="https://soci-269-a1.netlify.app/" height="450" width="1040" style="border: 1px solid #2e3846;">
453</iframe>
454</p>
455<div style="text-align: center; font-size: 80%; margin-top:-40px">
456<p><a href="https://soci-269-a1.netlify.app/" data-preview-link="true">Full Page</a></p>
457</div>
458</div>
459</section></section>
460<section>
461<section id="todays-preliminaries-1" class="title-slide slide level1 center" data-background-color="#43464B">
462<h1>Today’s Preliminaries</h1>
463
464</section>
465<section id="todays-packages-1" class="slide level2">
466<h2>Today’s Packages</h2>
467<div style="text-align: center; margin-top: 60px; font-size: 105%;">
468<p>Launch <span style="color: #5d3c85;"><strong>RStudio</strong></span> and run the following code:</p>
469<div class="cell">
470<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb3-1"><a href=""></a><span class="co"># A FINAL SUITE OF PACKAGES (YOU MAY HAVE SOME OF THESE ALREADY)</span></span>
471<span id="cb3-2"><a href=""></a></span>
472<span id="cb3-3"><a href=""></a>week9_2 <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">"see"</span>, <span class="st">"ggthemes"</span>, <span class="st">"ggdist"</span>, <span class="st">
472"ggrepel"</span>)</span>
473<span id="cb3-4"><a href=""></a></span>
474<span id="cb3-5"><a href=""></a><span class="fu">install.packages</span>(week9_2)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
475</div>
476<p>Give me a <span style="color: #5d3c85;"><i class="fa-solid fa-thumbs-up" aria-label="thumbs-up"></i></span> when all the packages have been installed.</p>
477</div>
478</section>
479<section id="todays-script-file-1" class="slide level2">
480<h2>Today’s Script File</h2>
481<div style="text-align: center; margin-top: 40px; font-size: 105%;">
482<p>You can access today’s script file here.</p>
483<p align="center">
484<iframe class="iframe" src="data/week9_2.R" height="400" width="800" style="border: 1px solid #2e3846;">
485</iframe>
486</p>
487<div style="text-align: center; font-size: 90%; margin-top:-40px">
488<p><a href="./data/week9_2.R">Download <i class="fa-solid fa-download" aria-label="download"></i></a></p>
489</div>
490</div>
491</section>
492<section id="our-data-2" class="slide level2">
493<h2>Our Data</h2>
494<div style="text-align: center; margin-top: 120px; font-size: 105%;">
495<p>You can access the data for today’s session by<br>executing the following code:</p>
496<div class="cell">
497<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb4-1"><a href=""></a><span class="fu">load</span>(<span class="fu">url</span>(<span class="st">"https://github.com/sakeefkarim/soci-269-f25/raw/refs/heads/main/data/week%209/week9.RData"</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
498</div>
499</div>
500</section>
501<section id="lets-launch-rstudio-1" class="slide level2">
502<h2>Let’s Launch RStudio</h2>
503<div style="margin-top: 90px; text-align: center;">
504<div class="callout callout-tip callout-titled callout-style-default">
505<div class="callout-body">
506<div class="callout-title">
507<div class="callout-icon-container">
508<i class="callout-icon"></i>
509</div>
510<p><strong>Note</strong></p>
511</div>
512<div class="callout-content">
513<p>The rest of today’s session will take place in <span style="color: #5d3c85;"><strong>RStudio</strong></span>!</p>
514</div>
515</div>
516</div>
517</div>
518</section></section>
519<section>
520<section id="exercises" class="title-slide slide level1 center" data-background-color="#43464B">
521<h1>Exercises</h1>
522
523</section>
524<section id="reproduce-this-plot" class="slide level2">
525<h2>Reproduce This Plot</h2>
526<div style="margin-top: 30px; font-size: 90%; text-align: center; margin-bottom: -20px;">
527<p>Reproduce the plot below using <code>gapminder</code> and the <code>ggthemes</code> package.</p>
528</div>
529<div class="image-scale" style="transform: scale(0.9); transform-origin: center;">
530<div class="cell" data-layout-align="center">
531<div class="cell-output-display">
532<div class="quarto-figure quarto-figure-center">
533<figure>
534<p><a href="index_files/figure-revealjs/beginner-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-1"><img data-src="index_files/figure-revealjs/beginner-1.png" class="quarto-figure quarto-figure-center" style="width:65.0%"></a></p>
535</figure>
536</div>
537</div>
538</div>
539</div>
540<div style="margin-top: -60px; font-size: 80%;">
541<div class="scrollable-note">
542<p>Please click the image to see a larger version of the plot.</p>
543</div>
544</div>
545</section>
546<section id="reproduce-this-plot-1" class="slide level2">
547<h2>Reproduce This Plot</h2>
548<div style="margin-top: 30px; font-size: 90%; text-align: center; margin-bottom: -10px;">
549<p>Reproduce the plot below using the <code>see</code> package and <code>geom</code>s from <code>ggdist</code>.</p>
550</div>
551<div class="image-scale" style="transform: scale(1); transform-origin: center;">
552<div class="cell" data-layout-align="center">
553<div class="cell-output-display">
554<div class="quarto-figure quarto-figure-center">
555<figure>
556<p><a href="index_files/figure-revealjs/unnamed-chunk-3-1.png" class="lightbox" data-gallery="quarto-lightbox-gallery-2"><img data-src="index_files/figure-revealjs/unnamed-chunk-3-1.png" class="quarto-figure quarto-figure-center" style="width:28.0%"></a></p>
557</figure>
558</div>
559</div>
560</div>
561</div>
562<div style="margin-top: -60px; font-size: 80%;">
563<div class="scrollable-note">
564<p>Please click the image to see a larger version of the plot.</p>
565</div>
566</div>
567</section>
568<section id="reimagine-these-plots" class="slide level2">
569<h2>Reimagine These Plots</h2>
570<div style="margin-top: 30px; text-align: center; margin-bottom: 20px;">
571<p>Use <code>ggplot2</code> and data from the <a href="https://www2.census.gov/programs-surveys/popproj/tables/2012/2012-summary-tables/np2012-t6.xls" class="exteral" target="_blank">US Census Bureau</a> to reimagine these plots from Abascal’s <span class="citation" data-cites="abascal_contraction_2020">(<a href="#/references" role="doc-biblioref" onclick="">2020</a>)</span> survey experiment.</p>
572</div>
573<div class="columns">
574<div class="column" style="width:50%;">
575<div style="font-size: 50%; text-align: center; margin-top: 10px; margin-bottom: -20px;">
576<details>
577<summary>
578Source
579</summary>
580<p><code>Figure A1</code>&nbsp; from Abascal <span class="citation" data-cites="abascal_contraction_2020">(<a href="#/references" role="doc-biblioref" onclick="">2020</a>)</span></p>
581</details>
582</div>
583<div class="quarto-figure quarto-figure-center">
584<figure>
585<p><a href="./media/figa1_abascal.jpeg" class="lightbox" data-gallery="abascal"><img data-src="./media/figa1_abascal.jpeg" class="quarto-figure quarto-figure-center" style="width:85.0%"></a></p>
586</figure>
587</div>
588</div><div class="column" style="width:50%;">
589<div style="font-size: 50%; text-align: center; margin-top: 10px; margin-bottom: -20px;">
590<details>
591<summary>
592Source
593</summary>
594<p><code>Figure A2</code>&nbsp; from Abascal <span class="citation" data-cites="abascal_contraction_2020">(<a href="#/references" role="doc-biblioref" onclick="">2020</a>)</span></p>
595</details>
596</div>
597<div class="quarto-figure quarto-figure-center">
598<figure>
599<p><a href="./media/figa2_abascal.jpeg" class="lightbox" data-gallery="abascal"><img data-src="./media/figa2_abascal.jpeg" class="quarto-figure quarto-figure-center" style="width:85.0%"></a></p>
600</figure>
601</div>
602</div></div>
603<div class="scrollable-note">
604<p>You can click on either of these plots to launch a two-image gallery.</p>
605</div>
606</section></section>
607<section>
608<section id="enjoy-the-weekend" class="title-slide slide level1 center" data-background-color="#43464B">
609<h1>Enjoy the Weekend</h1>
610<div class="invisible">
611<p><span class="citation" data-cites="wickham_r_2023">(<a href="#/references" role="doc-biblioref" onclick="">Wickham, Çetinkaya-Rundel, and Grolemund 2023</a>)</span></p>
612<p><span class="citation" data-cites="healy_data_2019">(<a href="#/references" role="doc-biblioref" onclick="">
612Healy 2019</a>)</span></p>
613</div>
614</section>
615<section id="references" class="slide level2 smaller scrollable">
616<h2>References</h2>
617<!-- [**Note**: Scroll `<svg aria-hidden="true" role="img" viewBox="0 0 384 512" style="height:1em;width:0.75em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#5d3c85;overflow:visible;position:relative;"><path d="M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>`{=html} to access the entire bibliography]{style="color: #9c9c9c; font-size:95%;"} -->
618
619<div id="refs" class="references csl-bib-body hanging-indent" role="list">
620<div id="ref-abascal_contraction_2020" class="csl-entry" role="listitem">
621Abascal, Maria. 2020. <span>“Contraction as a <span>Response</span> to <span>Group</span> <span>Threat</span>: <span>Demographic</span> <span>Decline</span> and <span>Whites</span>’ <span>Classification</span> of <span>People</span> <span>Who</span> <span>Are</span> <span>Ambiguously</span> <span>White</span>.”</span> <em>American Sociological Review</em> 85(2):298–322. doi: <a href="https://doi.org/10.1177/0003122420905127">10.1177/0003122420905127</a>.
622</div>
623<div id="ref-healy_data_2019" class="csl-entry" role="listitem">
624Healy, Kieran Joseph. 2019. <em><a href="https://socviz.co/">Data Visualization: A Practical Introduction</a></em>. Princeton, NJ: Princeton University Press.
625</div>
626<div id="ref-wickham_r_2023" class="csl-entry" role="listitem">
627Wickham, Hadley, Mine Çetinkaya-Rundel, and Garrett Grolemund. 2023. <em><a href="https://r4ds.hadley.nz/">R for Data Science: Import, Tidy, Transform, Visualize, and Model Data</a></em>. 2nd edition. Sebastopol, CA: O’Reilly.
628</div>
629</div>
630</section></section>
631    </div>
632  <div class="quarto-auto-generated-content" style="display: none;">
633<p><img src="media/amherst seal.png" class="slide-logo"></p>
634<div class="footer footer-default">
635
636</div>
637</div></div>
638
639  
639<script>window.backupDefine = window.define; window.define = undefined;</script>
639
640  
640<script src="index_files/libs/revealjs/dist/reveal.js"></script>
640
641  <!-- reveal.js plugins -->
642  
642<script src="index_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
642
643  
643<script src="index_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
643
644  
644<script src="index_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
644
645  
645<script src="index_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
645
646  
646<script src="index_files/libs/revealjs/plugin/reveal-chalkboard/plugin.js"></script>
646
647  
647<script src="index_files/libs/revealjs/plugin/reveal-attribution/attribution.js"></script>
647
648  
648<script src="index_files/libs/revealjs/plugin/simplemenu/simplemenu.js"></script>
648
649  
649<script src="index_files/libs/revealjs/plugin/quarto-support/support.js"></script>
649
650  
651
652  
652<script src="index_files/libs/revealjs/plugin/notes/notes.js"></script>
652
653  
653<script src="index_files/libs/revealjs/plugin/search/search.js"></script>
653
654  
654<script src="index_files/libs/revealjs/plugin/zoom/zoom.js"></script>
654
655  
655<script>window.define = window.backupDefine; window.backupDefine = undefined;</script>
655
656
657  
657<script>
658
659      // Full list of configuration options available at:
660      // https://revealjs.com/config/
661      Reveal.initialize({
662'controlsAuto': true,
663'previewLinksAuto': true,
664'pdfSeparateFragments': false,
665'autoAnimateEasing': "ease",
666'autoAnimateDuration': 1,
667'autoAnimateUnmatched': true,
668'jumpToSlide': true,
669'menu': {"side":"left","useTextContentForMissingTitles":true,"markers":false,"loadIcons":false,"custom":[{"title":"Tools","icon":"<i class=\"fas fa-gear\"></i>","content":"<ul class=\"slide-menu-items\">\n<li class=\"slide-tool-item active\" data-item=\"0\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.fullscreen(event)\"><kbd>f</kbd> Fullscreen</a></li>\n<li class=\"slide-tool-item\" data-item=\"1\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.speakerMode(event)\"><kbd>s</kbd> Speaker View</a></li>\n<li class=\"slide-tool-item\" data-item=\"2\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.overview(event)\"><kbd>o</kbd> Slide Overview</a></li>\n<li class=\"slide-tool-item\" data-item=\"3\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.togglePdfExport(event)\"><kbd>e</kbd> PDF Export Mode</a></li>\n<li class=\"slide-tool-item\" data-item=\"4\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.toggleScrollView(event)\"><kbd>r</kbd> Scroll View Mode</a></li>\n<li class=\"slide-tool-item\" data-item=\"5\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.toggleChalkboard(event)\"><kbd>b</kbd> Toggle Chalkboard</a></li>\n<li class=\"slide-tool-item\" data-item=\"6\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.toggleNotesCanvas(event)\"><kbd>c</kbd> Toggle Notes Canvas</a></li>\n<li class=\"slide-tool-item\" data-item=\"7\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.downloadDrawings(event)\"><kbd>d</kbd> Download Drawings</a></li>\n<li class=\"slide-tool-item\" data-item=\"8\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.keyboardHelp(event)\"><kbd>?</kbd> Keyboard Help</a></li>\n</ul>"}],"openButton":true,"numbers":true,"width":"wide"},
670'chalkboard': {"buttons":true},
671'simplemenu': {"menubarclass":"menubar","menuclass":"menu","activeclass":"active","activeelement":"li","flat":false,"barhtml":{"header":"","footer":""},"scale":0.67},
672'smaller': false,
673 
674        // Display controls in the bottom right corner
675        controls: false,
676
677        // Help the user learn the controls by providing hints, for example by
678        // bouncing the down arrow when they first encounter a vertical slide
679        controlsTutorial: false,
680
681        // Determines where controls appear, "edges" or "bottom-right"
682        controlsLayout: 'edges',
683
684        // Visibility rule for backwards navigation arrows; "faded", "hidden"
685        // or "visible"
686        controlsBackArrows: 'faded',
687
688        // Display a presentation progress bar
689        progress: true,
690
691        // Display the page number of the current slide
692        slideNumber: false,
693
694        // 'all', 'print', or 'speaker'
695        showSlideNumber: 'all',
696
697        // Add the current slide number to the URL hash so that reloading the
698        // page/copying the URL will return you to the same slide
699        hash: true,
700
701        // Start with 1 for the hash rather than 0
702        hashOneBasedIndex: false,
703
704        // Flags if we should monitor the hash and change slides accordingly
705        respondToHashChanges: true,
706
707        // Push each slide change to the browser history
708        history: true,
709
710        // Enable keyboard shortcuts for navigation
711        keyboard: true,
712
713        // Enable the slide overview mode
714        overview: true,
715
716        // Disables the default reveal.js slide layout (scaling and centering)
717        // so that you can use custom CSS layout
718        disableLayout: false,
719
720        // Vertical centering of slides
721        center: false,
722
723        // Enables touch navigation on devices with touch input
724        touch: true,
725
726        // Loop the presentation
727        loop: false,
728
729        // Change the presentation direction to be RTL
730        rtl: false,
731
732        // see https://revealjs.com/vertical-slides/#navigation-mode
733        navigationMode: 'linear',
734
735        // Randomizes the order of slides each time the presentation loads
736        shuffle: false,
737
738        // Turns fragments on and off globally
739        fragments: true,
740
741        // Flags whether to include the current fragment in the URL,
742        // so that reloading brings you to the same fragment position
743        fragmentInURL: false,
744
745        // Flags if the presentation is running in an embedded mode,
746        // i.e. contained within a limited portion of the screen
747        embedded: false,
748
749        // Flags if we should show a help overlay when the questionmark
750        // key is pressed
751        help: true,
752
753        // Flags if it should be possible to pause the presentation (blackout)
754        pause: true,
755
756        // Flags if speaker notes should be visible to all viewers
757        showNotes: false,
758
759        // Global override for autoplaying embedded media (null/true/false)
760        autoPlayMedia: null,
761
762        // Global override for preloading lazy-loaded iframes (null/true/false)
763        preloadIframes: null,
764
765        // Number of milliseconds between automatically proceeding to the
766        // next slide, disabled when set to 0, this value can be overwritten
767        // by using a data-autoslide attribute on your slides
768        autoSlide: 0,
769
770        // Stop auto-sliding after user input
771        autoSlideStoppable: true,
772
773        // Use this method for navigation when auto-sliding
774        autoSlideMethod: null,
775
776        // Specify the average time in seconds that you think you will spend
777        // presenting each slide. This is used to show a pacing timer in the
778        // speaker view
779        defaultTiming: null,
780
781        // Enable slide navigation via mouse wheel
782        mouseWheel: false,
783
784        // The display mode that will be used to show slides
785        display: 'block',
786
787        // Hide cursor if inactive
788        hideInactiveCursor: true,
789
790        // Time before the cursor is hidden (in ms)
791        hideCursorTime: 5000,
792
793        // Opens links in an iframe preview overlay
794        previewLinks: false,
795
796        // Transition style (none/fade/slide/convex/concave/zoom)
797        transition: 'none',
798
799        // Transition speed (default/fast/slow)
800        transitionSpeed: 'default',
801
802        // Transition style for full page slide backgrounds
803        // (none/fade/slide/convex/concave/zoom)
804        backgroundTransition: 'none',
805
806        // Number of slides away from the current that are visible
807        viewDistance: 3,
808
809        // Number of slides away from the current that are visible on mobile
810        // devices. It is advisable to set this to a lower number than
811        // viewDistance in order to save resources.
812        mobileViewDistance: 2,
813
814        // The "normal" size of the presentation, aspect ratio will be preserved
815        // when the presentation is scaled to fit different resolutions. Can be
816        // specified using percentage units.
817        width: 1050,
818
819        height: 700,
820
821        // Factor of the display size that should remain empty around the content
822        margin: 0.1,
823
824        // reveal.js plugins
825        plugins: [QuartoLineHighlight, PdfExport, RevealMenu, RevealChalkboard, RevealAttribution, Simplemenu, QuartoSupport,
826
827          RevealNotes,
828          RevealSearch,
829          RevealZoom
830        ]
831      });
832    </script>
832
833    
834    
834<script>
835      // htmlwidgets need to know to resize themselves when slides are shown/hidden.
836      // Fire the "slideenter" event (handled by htmlwidgets.js) when the current
837      // slide changes (different for each slide format).
838      (function () {
839        // dispatch for htmlwidgets
840        function fireSlideEnter() {
841          const event = window.document.createEvent("Event");
842          event.initEvent("slideenter", true, true);
843          window.document.dispatchEvent(event);
844        }
845
846        function fireSlideChanged(previousSlide, currentSlide) {
847          fireSlideEnter();
848
849          // dispatch for shiny
850          if (window.jQuery) {
851            if (previousSlide) {
852              window.jQuery(previousSlide).trigger("hidden");
853            }
854            if (currentSlide) {
855              window.jQuery(currentSlide).trigger("shown");
856            }
857          }
858        }
859
860        // hookup for slidy
861        if (window.w3c_slidy) {
862          window.w3c_slidy.add_observer(function (slide_num) {
863            // slide_num starts at position 1
864            fireSlideChanged(null, w3c_slidy.slides[slide_num - 1]);
865          });
866        }
867
868      })();
869    </script>
869
870
871    
871<script id="quarto-html-after-body" type="application/javascript">
872      window.document.addEventListener("DOMContentLoaded", function (event) {
873        const tabsets =  window.document.querySelectorAll(".panel-tabset-tabby")
874        tabsets.forEach(function(tabset) {
875          const tabby = new Tabby('#' + tabset.id);
876        });
877        const isCodeAnnotation = (el) => {
878          for (const clz of el.classList) {
879            if (clz.startsWith('code-annotation-')) {                     
880              return true;
881            }
882          }
883          return false;
884        }
885        const onCopySuccess = function(e) {
886          // button target
887          const button = e.trigger;
888          // don't keep focus
889          button.blur();
890          // flash "checked"
891          button.classList.add('code-copy-button-checked');
892          var currentTitle = button.getAttribute("title");
893          button.setAttribute("title", "Copied!");
894          let tooltip;
895          if (window.bootstrap) {
896            button.setAttribute("data-bs-toggle", "tooltip");
897            button.setAttribute("data-bs-placement", "left");
898            button.setAttribute("data-bs-title", "Copied!");
899            tooltip = new bootstrap.Tooltip(button, 
900              { trigger: "manual", 
901                customClass: "code-copy-button-tooltip",
902                offset: [0, -8]});
903            tooltip.show();    
904          }
905          setTimeout(function() {
906            if (tooltip) {
907              tooltip.hide();
908              button.removeAttribute("data-bs-title");
909              button.removeAttribute("data-bs-toggle");
910              button.removeAttribute("data-bs-placement");
911            }
912            button.setAttribute("title", currentTitle);
913            button.classList.remove('code-copy-button-checked');
914          }, 1000);
915          // clear code selection
916          e.clearSelection();
917        }
918        const getTextToCopy = function(trigger) {
919            const codeEl = trigger.previousElementSibling.cloneNode(true);
920            for (const childEl of codeEl.children) {
921              if (isCodeAnnotation(childEl)) {
922                childEl.remove();
923              }
924            }
925            return codeEl.innerText;
926        }
927        const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
928          text: getTextToCopy
929        });
930        clipboard.on('success', onCopySuccess);
931        if (window.document.getElementById('quarto-embedded-source-code-modal')) {
932          const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
933            text: getTextToCopy,
934            container: window.document.getElementById('quarto-embedded-source-code-modal')
935          });
936          clipboardModal.on('success', onCopySuccess);
937        }
938          var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
939          var mailtoRegex = new RegExp(/^mailto:/);
940            var filterRegex = new RegExp('/' + window.location.host + '/');
941          var isInternal = (href) => {
942              return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
943          }
944          // Inspect non-navigation links and adorn them if external
945         var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)');
946          for (var i=0; i<links.length; i++) {
947            const link = links[i];
948            if (!isInternal(link.href)) {
949              // undo the damage that might have been done by quarto-nav.js in the case of
950              // links that we want to consider external
951              if (link.dataset.originalHref !== undefined) {
952                link.href = link.dataset.originalHref;
953              }
954                // default icon
955                link.classList.add("external");
956            }
957          }
958        function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
959          const config = {
960            allowHTML: true,
961            maxWidth: 500,
962            delay: 100,
963            arrow: false,
964            appendTo: function(el) {
965                return el.closest('section.slide') || el.parentElement;
966            },
967            interactive: true,
968            interactiveBorder: 10,
969            theme: 'light-border',
970            placement: 'bottom-start',
971          };
972          if (contentFn) {
973            config.content = contentFn;
974          }
975          if (onTriggerFn) {
976            config.onTrigger = onTriggerFn;
977          }
978          if (onUntriggerFn) {
979            config.onUntrigger = onUntriggerFn;
980          }
981            config['offset'] = [0,0];
982            config['maxWidth'] = 700;
983          window.tippy(el, config); 
984        }
985        const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
986        for (var i=0; i<noterefs.length; i++) {
987          const ref = noterefs[i];
988          tippyHover(ref, function() {
989            // use id or data attribute instead here
990            let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
991            try { href = new URL(href).hash; } catch {}
992            const id = href.replace(/^#\/?/, "");
993            const note = window.document.getElementById(id);
994            if (note) {
995              return note.innerHTML;
996            } else {
997              return "";
998            }
999          });
1000        }
1001            let selectedAnnoteEl;
1002            const selectorForAnnotation = ( cell, annotation) => {
1003              let cellAttr = 'data-code-cell="' + cell + '"';
1004              let lineAttr = 'data-code-annotation="' +  annotation + '"';
1005              const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
1006              return selector;
1007            }
1008            const selectCodeLines = (annoteEl) => {
1009              const doc = window.document;
1010              const targetCell = annoteEl.getAttribute("data-target-cell");
1011              const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
1012              const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
1013              const lines = annoteSpan.getAttribute("data-code-lines").split(",");
1014              const lineIds = lines.map((line) => {
1015                return targetCell + "-" + line;
1016              })
1017              let top = null;
1018              let height = null;
1019              let parent = null;
1020              if (lineIds.length > 0) {
1021                  //compute the position of the single el (top and bottom and make a div)
1022                  const el = window.document.getElementById(lineIds[0]);
1023                  top = el.offsetTop;
1024                  height = el.offsetHeight;
1025                  parent = el.parentElement.parentElement;
1026                if (lineIds.length > 1) {
1027                  const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
1028                  const bottom = lastEl.offsetTop + lastEl.offsetHeight;
1029                  height = bottom - top;
1030                }
1031                if (top !== null && height !== null && parent !== null) {
1032                  // cook up a div (if necessary) and position it 
1033                  let div = window.document.getElementById("code-annotation-line-highlight");
1034                  if (div === null) {
1035                    div = window.document.createElement("div");
1036                    div.setAttribute("id", "code-annotation-line-highlight");
1037                    div.style.position = 'absolute';
1038                    parent.appendChild(div);
1039                  }
1040                  div.style.top = top - 2 + "px";
1041                  div.style.height = height + 4 + "px";
1042                  div.style.left = 0;
1043                  let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
1044                  if (gutterDiv === null) {
1045                    gutterDiv = window.document.createElement("div");
1046                    gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
1047                    gutterDiv.style.position = 'absolute';
1048                    const codeCell = window.document.getElementById(targetCell);
1049                    const gutter = codeCell.querySelector('.code-annotation-gutter');
1050                    gutter.appendChild(gutterDiv);
1051                  }
1052                  gutterDiv.style.top = top - 2 + "px";
1053                  gutterDiv.style.height = height + 4 + "px";
1054                }
1055                selectedAnnoteEl = annoteEl;
1056              }
1057            };
1058            const unselectCodeLines = () => {
1059              const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
1060              elementsIds.forEach((elId) => {
1061                const div = window.document.getElementById(elId);
1062                if (div) {
1063                  div.remove();
1064                }
1065              });
1066              selectedAnnoteEl = undefined;
1067            };
1068              // Handle positioning of the toggle
1069          window.addEventListener(
1070            "resize",
1071            throttle(() => {
1072              elRect = undefined;
1073              if (selectedAnnoteEl) {
1074                selectCodeLines(selectedAnnoteEl);
1075              }
1076            }, 10)
1077          );
1078          function throttle(fn, ms) {
1079          let throttle = false;
1080          let timer;
1081            return (...args) => {
1082              if(!throttle) { // first call gets through
1083                  fn.apply(this, args);
1084                  throttle = true;
1085              } else { // all the others get throttled
1086                  if(timer) clearTimeout(timer); // cancel #2
1087                  timer = setTimeout(() => {
1088                    fn.apply(this, args);
1089                    timer = throttle = false;
1090                  }, ms);
1091              }
1092            };
1093          }
1094            const annoteTargets = window.document.querySelectorAll('.code-annotation-anchor');
1095            for (let i=0; i<annoteTargets.length; i++) {
1096              const annoteTarget = annoteTargets[i];
1097              const targetCell = annoteTarget.getAttribute("data-target-cell");
1098              const targetAnnotation = annoteTarget.getAttribute("data-target-annotation");
1099              const contentFn = () => {
1100                const content = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
1101                if (content) {
1102                  const tipContent = content.cloneNode(true);
1103                  tipContent.classList.add("code-annotation-tip-content");
1104                  return tipContent.outerHTML;
1105                }
1106              }
1107              const config = {
1108                allowHTML: true,
1109                content: contentFn,
1110                onShow: (instance) => {
1111                  selectCodeLines(instance.reference);
1112                  instance.reference.classList.add('code-annotation-active');
1113                  window.tippy.hideAll();
1114                },
1115                onHide: (instance) => {
1116                  unselectCodeLines();
1117                  instance.reference.classList.remove('code-annotation-active');
1118                },
1119                maxWidth: 300,
1120                delay: [50, 0],
1121                duration: [200, 0],
1122                offset: [5, 10],
1123                arrow: true,
1124                trigger: 'click',
1125                appendTo: function(el) {
1126                  return el.parentElement.parentElement.parentElement;
1127                },
1128                interactive: true,
1129                interactiveBorder: 10,
1130                theme: 'light-border',
1131                placement: 'right',
1132                positionFixed: true,
1133                popperOptions: {
1134                  modifiers: [
1135                  {
1136                    name: 'flip',
1137                    options: {
1138                      flipVariations: false, // true by default
1139                      allowedAutoPlacements: ['right'],
1140                      fallbackPlacements: ['right', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left'],
1141                    },
1142                  },
1143                  {
1144                    name: 'preventOverflow',
1145                    options: {
1146                      mainAxis: false,
1147                      altAxis: false
1148                    }
1149                  }
1150                  ]        
1151                }      
1152              };
1153              window.tippy(annoteTarget, config); 
1154            }
1155        const findCites = (el) => {
1156          const parentEl = el.parentElement;
1157          if (parentEl) {
1158            const cites = parentEl.dataset.cites;
1159            if (cites) {
1160              return {
1161                el,
1162                cites: cites.split(' ')
1163              };
1164            } else {
1165              return findCites(el.parentElement)
1166            }
1167          } else {
1168            return undefined;
1169          }
1170        };
1171        var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
1172        for (var i=0; i<bibliorefs.length; i++) {
1173          const ref = bibliorefs[i];
1174          const citeInfo = findCites(ref);
1175          if (citeInfo) {
1176            tippyHover(citeInfo.el, function() {
1177              var popup = window.document.createElement('div');
1178              citeInfo.cites.forEach(function(cite) {
1179                var citeDiv = window.document.createElement('div');
1180                citeDiv.classList.add('hanging-indent');
1181                citeDiv.classList.add('csl-entry');
1182                var biblioDiv = window.document.getElementById('ref-' + cite);
1183                if (biblioDiv) {
1184                  citeDiv.innerHTML = biblioDiv.innerHTML;
1185                }
1186                popup.appendChild(citeDiv);
1187              });
1188              return popup.innerHTML;
1189            });
1190          }
1191        }
1192      });
1193      </script>
1193
1194    
1194<script>var lightboxQuarto = GLightbox({"closeEffect":"zoom","descPosition":"bottom","loop":false,"openEffect":"zoom","selector":".lightbox"});
1195    (function() {
1196      let previousOnload = window.onload;
1197      window.onload = () => {
1198        if (previousOnload) {
1199          previousOnload();
1200        }
1201        lightboxQuarto.on('slide_before_load', (data) => {
1202          const { slideIndex, slideNode, slideConfig, player, trigger } = data;
1203          const href = trigger.getAttribute('href');
1204          if (href !== null) {
1205            const imgEl = window.document.querySelector(`a[href="${href}"] img`);
1206            if (imgEl !== null) {
1207              const srcAttr = imgEl.getAttribute("src");
1208              if (srcAttr && srcAttr.startsWith("data:")) {
1209                slideConfig.href = srcAttr;
1210              }
1211            }
1212          } 
1213        });
1214      
1215        lightboxQuarto.on('slide_after_load', (data) => {
1216          const { slideIndex, slideNode, slideConfig, player, trigger } = data;
1217          if (window.Quarto?.typesetMath) {
1218            window.Quarto.typesetMath(slideNode);
1219          }
1220        });
1221      
1222      };
1223      
1224    })();
1225              </script>
1225
1226    
1227
1228</body></html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.