-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkshop.html
More file actions
616 lines (587 loc) · 34.6 KB
/
Copy pathWorkshop.html
File metadata and controls
616 lines (587 loc) · 34.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.9.36">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>2026 Workshop: Updating urban segregation computation with R</title>
<style>
/* Default styles provided by pandoc.
** See https://pandoc.org/MANUAL.html#variables-for-html for config info.
*/
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
</style>
<script src="Workshop_files/libs/clipboard/clipboard.min.js"></script>
<script src="Workshop_files/libs/quarto-html/quarto.js" type="module"></script>
<script src="Workshop_files/libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="Workshop_files/libs/quarto-html/popper.min.js"></script>
<script src="Workshop_files/libs/quarto-html/tippy.umd.min.js"></script>
<script src="Workshop_files/libs/quarto-html/anchor.min.js"></script>
<link href="Workshop_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="Workshop_files/libs/quarto-html/quarto-syntax-highlighting-845c23b38eaddc0f92fda52bfe77a8c8.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="Workshop_files/libs/bootstrap/bootstrap.min.js"></script>
<link href="Workshop_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="Workshop_files/libs/bootstrap/bootstrap-eeb5072725b83a3d2339e0264c232edd.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light">
<link href="Workshop_files/libs/htmltools-fill-0.5.9/fill.css" rel="stylesheet">
<script src="Workshop_files/libs/htmlwidgets-1.6.4/htmlwidgets.js"></script>
<script src="Workshop_files/libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<link href="Workshop_files/libs/leaflet-1.3.1/leaflet.css" rel="stylesheet">
<script src="Workshop_files/libs/leaflet-1.3.1/leaflet.js"></script>
<link href="Workshop_files/libs/leafletfix-1.0.0/leafletfix.css" rel="stylesheet">
<script src="Workshop_files/libs/proj4-2.6.2/proj4.min.js"></script>
<script src="Workshop_files/libs/Proj4Leaflet-1.0.1/proj4leaflet.js"></script>
<link href="Workshop_files/libs/rstudio_leaflet-1.3.1/rstudio_leaflet.css" rel="stylesheet">
<script src="Workshop_files/libs/leaflet-binding-2.2.3/leaflet.js"></script>
<script src="Workshop_files/libs/leaflet-providers-3.0.0/leaflet-providers.js"></script>
<script src="Workshop_files/libs/leaflet-providers-plugin-2.2.3/leaflet-providers-plugin.js"></script>
</head>
<body class="quarto-light">
<div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<nav id="TOC" role="doc-toc" class="toc-active">
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#summary" id="toc-summary" class="nav-link active" data-scroll-target="#summary">Summary</a></li>
<li><a href="#form" id="toc-form" class="nav-link" data-scroll-target="#form">Registration (before 2026-06-30)</a></li>
<li><a href="#program" id="toc-program" class="nav-link" data-scroll-target="#program">Programme</a>
<ul class="collapse">
<li><a href="#day-1.-forming-community-over-a-common-goal" id="toc-day-1.-forming-community-over-a-common-goal" class="nav-link" data-scroll-target="#day-1.-forming-community-over-a-common-goal">Day 1. Forming community over a common goal</a></li>
<li><a href="#day-2.-finding-consensus-over-the-communitys-needs" id="toc-day-2.-finding-consensus-over-the-communitys-needs" class="nav-link" data-scroll-target="#day-2.-finding-consensus-over-the-communitys-needs">Day 2. Finding consensus over the community’s needs</a></li>
<li><a href="#day-3.-switching-from-analysis-to-design" id="toc-day-3.-switching-from-analysis-to-design" class="nav-link" data-scroll-target="#day-3.-switching-from-analysis-to-design">Day 3. Switching from analysis to design</a></li>
<li><a href="#day-4.-r-package-design" id="toc-day-4.-r-package-design" class="nav-link" data-scroll-target="#day-4.-r-package-design">Day 4. R package design</a></li>
<li><a href="#day-5.-preparing-the-follow-up" id="toc-day-5.-preparing-the-follow-up" class="nav-link" data-scroll-target="#day-5.-preparing-the-follow-up">Day 5. Preparing the follow-up</a></li>
</ul></li>
<li><a href="#team" id="toc-team" class="nav-link" data-scroll-target="#team">Organizing team and confirmed partipants</a></li>
<li><a href="#date-location" id="toc-date-location" class="nav-link" data-scroll-target="#date-location">Date & location</a></li>
<li><a href="#fund" id="toc-fund" class="nav-link" data-scroll-target="#fund">Funding and bursaries</a></li>
</ul>
</nav>
</div>
<main class="content" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">2026 Workshop: Updating urban segregation computation with R</h1>
</div>
<div class="quarto-title-meta">
</div>
</header>
<section id="summary" class="level2">
<h2 class="anchored" data-anchor-id="summary">Summary</h2>
<p>In November 2026, <a href="https://www.tudelft.nl/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="60"></a> is hosting a workshop gathering members of the <a href="http://erc-segue.nl/"><img src="logo.png" class="img-fluid quarto-figure quarto-figure-left" width="50"></a> project, members of <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="50"></a> and external experts, to <strong>identify and prioritise the methodological and technical developments needed to address big theoretical questions in the field of urban segregation (with R)</strong>.</p>
<hr>
<p>During 5 days, we want to foster <strong>research discussions</strong> spanning the diversity of theories and approaches to urban segregation (in terms of location, scale and social attributes considered, as well as type of data used), create a <strong>community</strong> of urban scholars who can collaborate on frontier research projects, comparative analysis, theory and methodology development, but also prepare the development of an <strong>R package</strong> dedicated to assist with the selection of appropriate measures of urban segregation (a “routemap”), their computation, visualization and analysis necessary to tackle state-of-the-art research questions in the field of urban segregation.</p>
<p>If you would like to be part of this event, please fill in the registration form <strong>before 30th June 2026</strong>. Admission results will be communicated mid-July 2026. We expect to invite between 10 and 20 participants to this workshop.</p>
<p>More on the scientific case can be read <a href="https://erc-segue.nl/scientificCase">here</a>.</p>
</section>
<section id="form" class="level2">
<h2 class="anchored" data-anchor-id="form">Registration (before 2026-06-30)</h2>
<iframe src="https://framaforms.org/workshop-updating-urban-segregation-computation-with-r-1777633857" width="100%" height="800" border="0">
</iframe>
</section>
<section id="program" class="level2">
<h2 class="anchored" data-anchor-id="program">Programme</h2>
<p>This workshop will be conducted over 5 days. The week switches from an initial focus on getting to know each other and reaching consensus on needs of our community to a final focus on package design and development planning. During the workshop, we build each day on the previous one as follows:</p>
<section id="day-1.-forming-community-over-a-common-goal" class="level3">
<h3 class="anchored" data-anchor-id="day-1.-forming-community-over-a-common-goal">Day 1. Forming community over a common goal</h3>
<ul>
<li>Introductory overview: What are the aims of the workshop? What is the program of the week/day? What do we want to achieve.</li>
<li>Speed dating: who are we? What do we bring to the workshop? what would we like to work on next in the field of urban segregation and what’s missing besides time and money? What are the unanswered questions due to lack of computation interest and skills in the field?</li>
<li>Review talks: Why quantify urban segregation? What’s the current landscape of indicators and packages?</li>
<li>Code along crash course: Comparing and interpreting the results of different segregation indices with existing packages.</li>
<li>Panel discussion: What are the achievements and unanswered questions in urban economic segregation?</li>
<li>Flash talks: what am I working on?</li>
<li>Social moment: informal conversations</li>
</ul>
</section>
<section id="day-2.-finding-consensus-over-the-communitys-needs" class="level3">
<h3 class="anchored" data-anchor-id="day-2.-finding-consensus-over-the-communitys-needs">Day 2. Finding consensus over the community’s needs</h3>
<ul>
<li>Review talks: How to develop an R package for urban segregation?</li>
<li>Code along crash course: Writing functions and computing indices</li>
<li>Review talks: How to model urban segregation, including its spatial dimension?</li>
<li>Code along crash course: (spatial) regression modelling with R</li>
<li>Panel discussion: What are the specificities of different dimensions of urban segregation?</li>
<li>Work groups: How are these specificities included in current R package landscape?</li>
<li>Reporting moment: Coming up with a collective list of needs</li>
</ul>
</section>
<section id="day-3.-switching-from-analysis-to-design" class="level3">
<h3 class="anchored" data-anchor-id="day-3.-switching-from-analysis-to-design">Day 3. Switching from analysis to design</h3>
<ul>
<li>Review talks: What are the temporal characteristics of urban segregation?</li>
<li>Code along crash course: visualising urban segregation</li>
<li>Collective discussion: Avoiding the YARP syndrome (Yet Another R Package).</li>
<li>Excursion to Fenix-Rotterdam: a new art museum about migration.</li>
<li>Social Moment: Workshop dinner</li>
</ul>
</section>
<section id="day-4.-r-package-design" class="level3">
<h3 class="anchored" data-anchor-id="day-4.-r-package-design">Day 4. R package design</h3>
<ul>
<li>Panel discussion: What are the specificities of multi-layered and multi-scale urban segregation?</li>
<li>Work groups: Defining the package requirements: 5 groups with distinct aspects of the tasks (indicators, spatial dimension, visualisation, interpretation and link to theory, perimeter of the package)</li>
<li>Reporting moment: Coming up with a collective list of tests</li>
<li>Code along crash course: test-driven development</li>
<li>Collective discussion: How to keep this community together in the next few weeks/months?</li>
<li>Social moment: informal conversations in small groups</li>
</ul>
</section>
<section id="day-5.-preparing-the-follow-up" class="level3">
<h3 class="anchored" data-anchor-id="day-5.-preparing-the-follow-up">Day 5. Preparing the follow-up</h3>
<ul>
<li>Work groups: A Developer group work on prioritizing functions to develop within the package. A User group work on defining the use cases (specificities, data availability, etc) to demonstrate the added-value of the package.</li>
<li>Reporting moment: The two group report on their work and the whole group discuss the order of the lists of functions to develop and list of use cases</li>
<li>Collective discussion: Defining roles, timelines and actions for the follow-up activities.</li>
<li>Planning moment: Agreeing on a strategic roadmap for the package development, user plan and publication plan.</li>
<li>Summary closing and goodbyes</li>
</ul>
<hr>
<p><strong>Post-workshop</strong>, we will implement the roadmap to complete the package, write its documentation and user manual. Using <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="50"></a>’s experience, <a href="http://erc-segue.nl/"><img src="logo.png" class="img-fluid quarto-figure quarto-figure-left" width="50"></a>’s funding and the co-organisers’ time and coordination efforts, the community will be brought together virtually at regular intervals, as well as in person for a final conference showcasing the package and its use cases.</p>
</section>
</section>
<section id="team" class="level2">
<h2 class="anchored" data-anchor-id="team">Organizing team and confirmed partipants</h2>
<ul>
<li><p><a href="https://research.tudelft.nl/en/persons/a-petrovi%C4%87/">Ana Petrovic</a>, Assistant Professor in urban studies at <a href="https://www.tudelft.nl/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="60"></a> <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a></p></li>
<li><p><a href="https://crh.ehess.fr/index.php?9040">Aurélie Douet</a>, Research engineer (GIS and mapping) at EHESS, France</p></li>
<li><p><a href="https://cforgaci.github.io/">Claudiu Forgaci</a>, Assistant Professor in urban design at <a href="https://www.tudelft.nl/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="60"></a> <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a></p></li>
<li><p><a href="https://clementinecttn.github.io/">Clémentine Cottineau-Mugadza</a>, Assistant Professor in urban studies at <a href="https://www.tudelft.nl/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="60"></a> <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a><a href="http://erc-segue.nl/"><img src="logo.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a></p></li>
<li><p><a href="https://www.tudelft.nl/staff/d.cannatella/">Daniele Cannatella</a>, Assistant Professor in spatial data science at <a href="https://www.tudelft.nl/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="60"></a> <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a></p></li>
<li><p><a href="https://www.tudelft.nl/staff/i.a.urriayanez/">Ignacio Urria Yáñez</a>, PhD Candidate in urban studies at <a href="https://www.tudelft.nl/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="60"></a> <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a></p></li>
<li><p><a href="https://javiersanmillan.github.io/">Javier San Millan Tejedor</a>, PhD Candidate in urban studies at <a href="https://www.tudelft.nl/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="60"></a> <a href="http://rbanism.org/"><img src="Logo_Rbanism_%20Full.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a><a href="http://erc-segue.nl/"><img src="logo.png" class="img-fluid quarto-figure quarto-figure-left" width="30"></a></p></li>
<li><p><a href="https://lisst.univ-tlse2.fr/home/julie-vallee">Julie Vallée</a>, Senior researcher at CNRS, LISST, France</p></li>
<li><p><a href="https://jmigozzi.github.io/">Julien Migozzi</a>, Assistant Professor in Development Studies at University of Cambridge, UK</p></li>
<li><p><a href="https://www.ljwolf.org/">Levi John Wolf</a>, Associate Professor of Spatial Analysis at the University of Bristol , UK</p></li>
<li><p><a href="https://www.selcanmutgan.com/">Selcan Mutgan</a>, Assistant Professor at the Institute for Analytical Sociology in Linköping University, Sweden</p></li>
<li><p><a href="https://khu.elsevierpure.com/en/persons/seong-yun-hong/">Seong-Yun Hong</a>, Associate Professor at Kyung Hee University, South Korea</p></li>
<li><p><a href="https://www.uva.nl/en/profile/k/a/y.kazmina/y.kazmina.html">Yuliia Kazmina</a>, PhD candidate at the Faculty of Social and Behavioural Sciences, University of Amsterdam (NL)</p></li>
</ul>
</section>
<section id="date-location" class="level2">
<h2 class="anchored" data-anchor-id="date-location">Date & location</h2>
<p>The workshop will take place over 5 full days: <a href="https://github.com/SEGUE-Project/SEGUE-Project.github.io/blob/main/events.ics"><strong>9, 10, 11, 12 and 13 November 2026</strong></a>, at TU Delft, in the Netherlands.</p>
<div class="cell">
<div class="cell-output-display">
<div class="leaflet html-widget html-fill-item" id="htmlwidget-bd26e5584b56bdb1cb4c" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-bd26e5584b56bdb1cb4c">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"setView":[[52.0056562,4.3705259],9,[]],"calls":[{"method":"addProviderTiles","args":["CartoDB.Positron",null,null,{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addCircleMarkers","args":[52.0056562,4.3705259,10,null,null,{"interactive":true,"className":"","stroke":false,"color":"#ff6600ff","weight":5,"opacity":0.5,"fill":true,"fillColor":"#ff6600ff","fillOpacity":0.5},null,null,null,null,"TU Delft | Faculty of Architecture and the Built Environment | 9th Nov.",{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"className":"","sticky":true},null]},{"method":"addCircleMarkers","args":[52.0026415,4.3730109,15,null,null,{"interactive":true,"className":"","stroke":false,"color":"#ff6600ff","weight":5,"opacity":0.5,"fill":true,"fillColor":"#ff6600ff","fillOpacity":0.5},null,null,null,null,"TU Delft Library | 10-13th Nov.",{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"className":"","sticky":true},null]}],"limits":{"lat":[52.0026415,52.0056562],"lng":[4.3705259,4.3730109]}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section>
<section id="fund" class="level2">
<h2 class="anchored" data-anchor-id="fund">Funding and bursaries</h2>
<p>The workshop itself is free (including catering and excursions), but participants are expected to cover their own travel and accommodation expenses (check the <a href="https://www.thesocialhub.co/current-promotions/book-direct-deal/?utm_source=google&utm_medium=cpc&utm_campaign=hot_all00_book-direct_b2c&utm_content=nld-en&utm_source_platform=brand&utm_creative_format=text&utm_marketing_tactic=convert&gad_source=1&gad_campaignid=23807824256&gbraid=0AAAAADNotMvqsHGBcL8qYvnDZXp8o5s4h&gclid=Cj0KCQjw3K7RBhDJARIsAKRtP5TJWNp1hRP6Yf9IQ7D7T_uO5y6SuGb-QEZRZP6c8g7j89tfukmNC64aAleZEALw_wcB">Social Hub</a> Delft for affordable options). If your situation, position or institution does not allow you to fund your own travel and accommodation expenses, please indicate it on the registration form. Bursaries will be possible for up to 5 participants. The total capacity of the workshop is 30 participants.</p>
<p>This workshop is funded by the ERC project <a href="http://erc-segue.nl/"><img src="logo.png" class="img-fluid quarto-figure quarto-figure-left" width="50"></a>, and hosted gratuitously by the <a href="https://www.tudelft.nl/en/architecture-and-the-built-environment"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="80"></a> Faculty of Architecture and the Built environment and the <a href="https://www.tudelft.nl/en/library/"><img src="TUDelft.png" class="img-fluid quarto-figure quarto-figure-left" width="80"></a> Library.</p>
</section>
</main>
<!-- /main column -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {
placement: 'right',
icon: icon
};
anchorJS.add('.anchored');
const isCodeAnnotation = (el) => {
for (const clz of el.classList) {
if (clz.startsWith('code-annotation-')) {
return true;
}
}
return false;
}
const onCopySuccess = function(e) {
// button target
const button = e.trigger;
// don't keep focus
button.blur();
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "Copied!");
let tooltip;
if (window.bootstrap) {
button.setAttribute("data-bs-toggle", "tooltip");
button.setAttribute("data-bs-placement", "left");
button.setAttribute("data-bs-title", "Copied!");
tooltip = new bootstrap.Tooltip(button,
{ trigger: "manual",
customClass: "code-copy-button-tooltip",
offset: [0, -8]});
tooltip.show();
}
setTimeout(function() {
if (tooltip) {
tooltip.hide();
button.removeAttribute("data-bs-title");
button.removeAttribute("data-bs-toggle");
button.removeAttribute("data-bs-placement");
}
button.setAttribute("title", currentTitle);
button.classList.remove('code-copy-button-checked');
}, 1000);
// clear code selection
e.clearSelection();
}
const getTextToCopy = function(trigger) {
const outerScaffold = trigger.parentElement.cloneNode(true);
const codeEl = outerScaffold.querySelector('code');
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
text: getTextToCopy
});
clipboard.on('success', onCopySuccess);
if (window.document.getElementById('quarto-embedded-source-code-modal')) {
const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
text: getTextToCopy,
container: window.document.getElementById('quarto-embedded-source-code-modal')
});
clipboardModal.on('success', onCopySuccess);
}
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
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)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'quarto',
placement: 'bottom-start',
};
if (contentFn) {
config.content = contentFn;
}
if (onTriggerFn) {
config.onTrigger = onTriggerFn;
}
if (onUntriggerFn) {
config.onUntrigger = onUntriggerFn;
}
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
for (var i=0; i<noterefs.length; i++) {
const ref = noterefs[i];
tippyHover(ref, function() {
// use id or data attribute instead here
let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
const processXRef = (id, note) => {
// Strip column container classes
const stripColumnClz = (el) => {
el.classList.remove("page-full", "page-columns");
if (el.children) {
for (const child of el.children) {
stripColumnClz(child);
}
}
}
stripColumnClz(note)
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
container.appendChild(note.children[0].cloneNode(true));
for (let i = 1; i < note.children.length; i++) {
const child = note.children[i];
if (child.tagName === "P" && child.innerText === "") {
continue;
} else {
container.appendChild(child.cloneNode(true));
break;
}
}
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
// Remove any anchor links if they are present
const anchorLink = note.querySelector('a.anchorjs-link');
if (anchorLink) {
anchorLink.remove();
}
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
const xref = xrefs[i];
tippyHover(xref, undefined, function(instance) {
instance.disable();
let url = xref.getAttribute('href');
let hash = undefined;
if (url.startsWith('#')) {
hash = url;
} else {
try { hash = new URL(url).hash; } catch {}
}
if (hash) {
const id = hash.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note !== null) {
try {
const html = processXRef(id, note.cloneNode(true));
instance.setContent(html);
} finally {
instance.enable();
instance.show();
}
} else {
// See if we can fetch this
fetch(url.split('#')[0])
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.getElementById(id);
if (note !== null) {
const html = processXRef(id, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
}, function(instance) {
});
}
let selectedAnnoteEl;
const selectorForAnnotation = ( cell, annotation) => {
let cellAttr = 'data-code-cell="' + cell + '"';
let lineAttr = 'data-code-annotation="' + annotation + '"';
const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
return selector;
}
const selectCodeLines = (annoteEl) => {
const doc = window.document;
const targetCell = annoteEl.getAttribute("data-target-cell");
const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
const lines = annoteSpan.getAttribute("data-code-lines").split(",");
const lineIds = lines.map((line) => {
return targetCell + "-" + line;
})
let top = null;
let height = null;
let parent = null;
if (lineIds.length > 0) {
//compute the position of the single el (top and bottom and make a div)
const el = window.document.getElementById(lineIds[0]);
top = el.offsetTop;
height = el.offsetHeight;
parent = el.parentElement.parentElement;
if (lineIds.length > 1) {
const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
const bottom = lastEl.offsetTop + lastEl.offsetHeight;
height = bottom - top;
}
if (top !== null && height !== null && parent !== null) {
// cook up a div (if necessary) and position it
let div = window.document.getElementById("code-annotation-line-highlight");
if (div === null) {
div = window.document.createElement("div");
div.setAttribute("id", "code-annotation-line-highlight");
div.style.position = 'absolute';
parent.appendChild(div);
}
div.style.top = top - 2 + "px";
div.style.height = height + 4 + "px";
div.style.left = 0;
let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
if (gutterDiv === null) {
gutterDiv = window.document.createElement("div");
gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
gutterDiv.style.position = 'absolute';
const codeCell = window.document.getElementById(targetCell);
const gutter = codeCell.querySelector('.code-annotation-gutter');
gutter.appendChild(gutterDiv);
}
gutterDiv.style.top = top - 2 + "px";
gutterDiv.style.height = height + 4 + "px";
}
selectedAnnoteEl = annoteEl;
}
};
const unselectCodeLines = () => {
const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
elementsIds.forEach((elId) => {
const div = window.document.getElementById(elId);
if (div) {
div.remove();
}
});
selectedAnnoteEl = undefined;
};
// Handle positioning of the toggle
window.addEventListener(
"resize",
throttle(() => {
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
}
}, 10)
);
function throttle(fn, ms) {
let throttle = false;
let timer;
return (...args) => {
if(!throttle) { // first call gets through
fn.apply(this, args);
throttle = true;
} else { // all the others get throttled
if(timer) clearTimeout(timer); // cancel #2
timer = setTimeout(() => {
fn.apply(this, args);
timer = throttle = false;
}, ms);
}
};
}
// Attach click handler to the DT
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
for (const annoteDlNode of annoteDls) {
annoteDlNode.addEventListener('click', (event) => {
const clickedEl = event.target;
if (clickedEl !== selectedAnnoteEl) {
unselectCodeLines();
const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
if (activeEl) {
activeEl.classList.remove('code-annotation-active');
}
selectCodeLines(clickedEl);
clickedEl.classList.add('code-annotation-active');
} else {
// Unselect the line
unselectCodeLines();
clickedEl.classList.remove('code-annotation-active');
}
});
}
const findCites = (el) => {
const parentEl = el.parentElement;
if (parentEl) {
const cites = parentEl.dataset.cites;
if (cites) {
return {
el,
cites: cites.split(' ')
};
} else {
return findCites(el.parentElement)
}
} else {
return undefined;
}
};
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
for (var i=0; i<bibliorefs.length; i++) {
const ref = bibliorefs[i];
const citeInfo = findCites(ref);
if (citeInfo) {
tippyHover(citeInfo.el, function() {
var popup = window.document.createElement('div');
citeInfo.cites.forEach(function(cite) {
var citeDiv = window.document.createElement('div');
citeDiv.classList.add('hanging-indent');
citeDiv.classList.add('csl-entry');
var biblioDiv = window.document.getElementById('ref-' + cite);
if (biblioDiv) {
citeDiv.innerHTML = biblioDiv.innerHTML;
}
popup.appendChild(citeDiv);
});
return popup.innerHTML;
});
}
}
});
</script>
</div> <!-- /content -->
</body></html>