-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSemi-Structured-Data.html
More file actions
733 lines (512 loc) · 20.2 KB
/
Copy pathSemi-Structured-Data.html
File metadata and controls
733 lines (512 loc) · 20.2 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
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
<!DOCTYPE html>
<html>
<head>
<title>半結構化的資料處理</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="generator" content="pandoc" />
<meta name="date" content="2019-05-11" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<base target="_blank">
<script type="text/javascript">
var SLIDE_CONFIG = {
// Slide settings
settings: {
title: '半結構化的資料處理',
useBuilds: true,
usePrettify: true,
enableSlideAreas: true,
enableTouch: true,
},
// Author information
presenters: [
{
name: 'Wush Wu' ,
company: '',
gplus: '',
twitter: '',
www: '',
github: ''
},
]
};
</script>
<link href="Semi-Structured-Data_files/ioslides-13.5.1/fonts/fonts.css" rel="stylesheet" />
<link href="Semi-Structured-Data_files/ioslides-13.5.1/theme/css/default.css" rel="stylesheet" />
<link href="Semi-Structured-Data_files/ioslides-13.5.1/theme/css/phone.css" rel="stylesheet" />
<script src="Semi-Structured-Data_files/ioslides-13.5.1/js/modernizr.custom.45394.js"></script>
<script src="Semi-Structured-Data_files/ioslides-13.5.1/js/prettify/prettify.js"></script>
<script src="Semi-Structured-Data_files/ioslides-13.5.1/js/prettify/lang-r.js"></script>
<script src="Semi-Structured-Data_files/ioslides-13.5.1/js/prettify/lang-yaml.js"></script>
<script src="Semi-Structured-Data_files/ioslides-13.5.1/js/hammer.js"></script>
<script src="Semi-Structured-Data_files/ioslides-13.5.1/js/slide-controller.js"></script>
<script src="Semi-Structured-Data_files/ioslides-13.5.1/js/slide-deck.js"></script>
<style type="text/css">
b, strong {
font-weight: bold;
}
em {
font-style: italic;
}
summary {
display: list-item;
}
slides > slide {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
.auto-fadein {
-webkit-transition: opacity 0.6s ease-in;
-webkit-transition-delay: 0.4s;
-moz-transition: opacity 0.6s ease-in 0.4s;
-o-transition: opacity 0.6s ease-in 0.4s;
transition: opacity 0.6s ease-in 0.4s;
opacity: 0;
}
/* https://github.com/ropensci/plotly/pull/524#issuecomment-468142578 */
slide:not(.current) .plotly.html-widget{
display: block;
}
</style>
<link rel="stylesheet" href="semi-structured-data.css" type="text/css" />
<link rel="stylesheet" href="../css/dsp.css" type="text/css" />
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/wush-custom.css" type="text/css" />
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<slide class="title-slide segue nobackground">
<!-- The content of this hgroup is replaced programmatically through the slide_config.json. -->
<hgroup class="auto-fadein">
<h1 data-config-title><!-- populated from slide_config.json --></h1>
<h2 data-config-subtitle><!-- populated from slide_config.json --></h2>
<p data-config-presenter><!-- populated from slide_config.json --></p>
<p style="margin-top: 6px; margin-left: -2px;">2019-05-11</p>
</hgroup>
</slide>
<slide class="segue dark nobackground level1"><hgroup class = 'auto-fadein'><h2>半結構化的資料處理</h2></hgroup><article id="section">
</article></slide><slide class=""><hgroup><h2>大綱</h2></hgroup><article id="section-1">
<ul>
<li>XML</li>
<li>JSON</li>
</ul>
</article></slide><slide class="segue dark nobackground level1"><hgroup class = 'auto-fadein'><h2>XML</h2></hgroup><article id="xml">
</article></slide><slide class=""><hgroup><h2>XML(eXtensible Markup Language)</h2></hgroup><article id="xmlextensible-markup-language">
<ul>
<li>讓電腦能理解資料意義的資料格式
<ul>
<li>標籤(tag)</li>
<li>屬性(attribute)</li>
<li>內容(contents)</li>
</ul></li>
<li>由使用者定義標籤的意義</li>
</ul>
<pre ><?xml version="1.0"?>
<小紙條>
<收件人>大元</收件人>
<發件人>小張</發件人>
<主題>問候</主題>
<具體內容>早啊,飯吃了沒? </具體內容>
</小紙條></pre>
<p><small>出自:<a href='https://zh.wikipedia.org/wiki/XML#.E4.BE.8B' title=''>https://zh.wikipedia.org/wiki/XML#.E4.BE.8B</a></small></p>
</article></slide><slide class=""><hgroup><h2>XML標籤</h2></hgroup><article id="xml-1">
<pre ><?xml version="1.0"?>
<小紙條>
<收件人>大元</收件人>
<發件人>小張</發件人>
<主題>問候</主題>
<具體內容>早啊,飯吃了沒? </具體內容>
</小紙條></pre>
<ul>
<li>請問上述XML中有幾種標籤?
<ul>
<li>小紙條</li>
<li>收件人</li>
<li>發件人</li>
<li>主題</li>
<li>具體內容</li>
</ul></li>
</ul>
</article></slide><slide class=""><hgroup><h2>XML內容</h2></hgroup><article id="xml-2">
<pre ><?xml version="1.0"?>
<小紙條>
<收件人>大元</收件人>
<發件人>小張</發件人>
<主題>問候</主題>
<具體內容>早啊,飯吃了沒? </具體內容>
</小紙條></pre>
<ul>
<li>請問上述XML中各個標籤的內容是?
<ul>
<li>小紙條:<code><收件人> ... </具體內容></code></li>
<li>收件人:<code>大元</code></li>
<li>發件人:<code>小張</code></li>
<li>主題:<code>問候</code></li>
<li>具體內容:<code>早啊,飯吃了沒?</code></li>
</ul></li>
</ul>
</article></slide><slide class=""><hgroup><h2>XML屬性</h2></hgroup><article id="xml-3">
<ul>
<li>標籤可以附帶屬性</li>
</ul>
<h3>沒有屬性的標籤</h3>
<pre ><具體內容>早啊,飯吃了沒? </具體內容></pre>
<h3>有屬性的標籤</h3>
<pre ><具體內容 font="新細明體" size="12">早啊,飯吃了沒? </具體內容></pre>
<ul>
<li><code><具體內容></code>有以下的標籤:
<ul>
<li><code>font</code>:<code>新細明體</code></li>
<li><code>size</code>:<code>12</code></li>
</ul></li>
</ul>
</article></slide><slide class=""><hgroup><h2>XML declaration</h2></hgroup><article id="xml-declaration">
<ul>
<li>XML的第一行通常會宣告這一份XML文件所依循的標準與文件所使用的編碼(編碼是什麼,下週會討論到)</li>
</ul>
<pre ><?xml version="1.0"?></pre>
<pre ><?xml version="1.0" encoding="UTF-8"?></pre>
</article></slide><slide class=""><hgroup><h2>HTML</h2></hgroup><article id="html">
<p>(HyperText Markup Language)</p>
<ul>
<li>HTML用於撰寫網頁</li>
<li>HTML是比較寬鬆的XML,但是XML不是HTML
<ul>
<li>HTML允許用<code><foo/></code>代替<code><foo></foo></code></li>
<li>HTML中的標籤是被定義的</li>
<li>XML可以自己定義標籤</li>
</ul></li>
</ul>
<pre><code>
<html>
<head>
<script type="text/javascript" src="loadxmldoc.js">
</script>
</head>
<body>
<script type="text/javascript">
xmlDoc=<a href="dom_loadxmldoc.asp">loadXMLDoc</a>("books.xml");
document.write("xmlDoc is loaded, ready for use");
</script>
</body>
</html>
</code></pre>
<p><small>出自:<a href='http://www.w3school.com.cn/tags/tag_pre.asp' title=''>http://www.w3school.com.cn/tags/tag_pre.asp</a></small></p>
</article></slide><slide class=""><hgroup><h2>把XML當非結構化資料作處理</h2></hgroup><article id="xml-4">
<pre class = 'prettyprint lang-r'>x <- '<?xml version="1.0"?>
<小紙條>
<收件人>大元</收件人>
<發件人>小張</發件人>
<主題>問候</主題>
<具體內容>早啊,飯吃了沒? </具體內容>
</小紙條>
'</pre>
<ul>
<li>請找出這個紙條的主題
<ul>
<li>請找出標籤<主題>的內容</li>
</ul></li>
</ul>
</article></slide><slide class=""><hgroup><h2>把XML當非結構化資料作處理</h2></hgroup><article id="xml-5">
<pre class = 'prettyprint lang-r'>. <- strsplit(x, "\n")
. <- .[[1]]
. <- .[grepl("主題", .)]
. <- gsub("<主題>", "", .)
gsub("</主題>", "", .)</pre>
<pre >## [1] " 問候"</pre>
</article></slide><slide class=""><hgroup><h2>把XML當XML作處理</h2></hgroup><article id="xmlxml">
<ul>
<li>運用XML的結構,我們可以更穩健的找到我們要的資訊</li>
</ul>
<pre class = 'prettyprint lang-r'>library(xml2)
doc <- read_xml(x)
. <- xml_find_first(doc, "/小紙條/主題")
xml_text(.)</pre>
<pre >## [1] "問候"</pre>
</article></slide><slide class=""><hgroup><h2>XPath與XML的樹狀結構</h2></hgroup><article id="xpathxml">
<pre ><小紙條>
<收件人>大元</收件人>
<發件人>小張</發件人>
<主題>問候</主題>
<具體內容>早啊,飯吃了沒? </具體內容>
</小紙條></pre>
<ul>
<li><code><小紙條></code>是<code><主題></code>的父標籤
<ul>
<li>標籤之間的空白是不影響的XML的(只是為了排版好讀)</li>
</ul></li>
<li><code><收件人></code>、<code><發件人></code>、<code><主題></code>與<code><具體內容></code>都是<code><小紙條></code>的子標籤</li>
</ul>
</article></slide><slide class=""><hgroup><h2>XPath與XML的樹狀結構</h2></hgroup><article id="xpathxml-1">
<ul>
<li>除了最上層的根之外,XML中所有的標籤都有「唯一」的「父標籤」
<ul>
<li><code><小紙條></code>是這份XML文件的根</li>
<li><code><html></code>是所有網頁的根</li>
</ul></li>
</ul>
<table class="formatter">
<tr>
<td>
<pre class = 'prettyprint lang-r'>doc <- read_xml(x)
class(doc)</pre>
<pre >## [1] "xml_document" "xml_node"</pre>
<pre class = 'prettyprint lang-r'>doc</pre>
<pre >## {xml_document}
## <小紙條>
## [1] <收件人>大元</收件人>
## [2] <發件人>小張</發件人>
## [3] <主題>問候</主題>
## [4] <具體內容>早啊,飯吃了沒? </具體內容></pre>
</td>
<td>
<pre class = 'prettyprint lang-r'>root <- xml_root(doc)
class(root)</pre>
<pre >## [1] "xml_document" "xml_node"</pre>
<pre class = 'prettyprint lang-r'>root</pre>
<pre >## {xml_document}
## <小紙條>
## [1] <收件人>大元</收件人>
## [2] <發件人>小張</發件人>
## [3] <主題>問候</主題>
## [4] <具體內容>早啊,飯吃了沒? </具體內容></pre>
</td>
</tr>
</table>
</article></slide><slide class=""><hgroup><h2>在XML中移動</h2></hgroup><article id="xml-6">
<ul>
<li><code><收件人></code>、<code><發件人></code>、<code><主題></code>、<code><具體內容></code>是<code><小紙條></code>的子(child)節點</li>
</ul>
<center>
<p><img src="Semi-Structured-Data_files/figure-html/unnamed-chunk-3-1.png" width="384" /></p>
<pre >## [,1] [,2]
## [1,] 0.500 0.75
## [2,] 0.125 0.25
## [3,] 0.375 0.25
## [4,] 0.625 0.25
## [5,] 0.875 0.25</pre>
</center>
</article></slide><slide class=""><hgroup><h2>在XML中移動</h2></hgroup><article id="xml-7">
<table class="formatter">
<tr>
<td>
<ul>
<li>假設我們定位了一個node,例如<code><小紙條></code></li>
</ul>
<pre class = 'prettyprint lang-r'>node <- xml_root(doc)
node</pre>
<pre >## {xml_document}
## <小紙條>
## [1] <收件人>大元</收件人>
## [2] <發件人>小張</發件人>
## [3] <主題>問候</主題>
## [4] <具體內容>早啊,飯吃了沒? </具體內容></pre>
</td>
<td>
<p><img src="Semi-Structured-Data_files/figure-html/unnamed-chunk-5-1.png" width="384" /></p>
</td>
</tr>
</table>
</article></slide><slide class=""><hgroup><h2>在XML中移動</h2></hgroup><article id="xml-8">
<table class="formatter">
<tr>
<td>
<ul>
<li>可以取得<code>node</code>的子節點們(nodeset)</li>
</ul>
<pre class = 'prettyprint lang-r'>xml_children(node)</pre>
<pre >## {xml_nodeset (4)}
## [1] <收件人>大元</收件人>
## [2] <發件人>小張</發件人>
## [3] <主題>問候</主題>
## [4] <具體內容>早啊,飯吃了沒? </具體內容></pre>
</td>
<td>
<p><img src="Semi-Structured-Data_files/figure-html/unnamed-chunk-7-1.png" width="384" /></p>
</td>
</tr>
</table>
</article></slide><slide class=""><hgroup><h2>在XML中移動</h2></hgroup><article id="xml-9">
<table class="formatter">
<tr>
<td>
<ul>
<li>用中括號從一群節點(nodeset)中挑出一個特定的節點</li>
</ul>
<pre class = 'prettyprint lang-r'>node <- xml_children(node)[[2]]
node</pre>
<pre >## {xml_node}
## <發件人></pre>
</td>
<td>
<p><img src="Semi-Structured-Data_files/figure-html/unnamed-chunk-9-1.png" width="384" /></p>
</td>
</tr>
</table>
</article></slide><slide class=""><hgroup><h2>在XML中移動</h2></hgroup><article id="xml-10">
<table class="formatter">
<tr>
<td>
<ul>
<li>用<code>xml_parent</code>來找出父節點(parent)</li>
</ul>
<pre class = 'prettyprint lang-r'>node <- xml_parent(node)
node</pre>
<pre >## {xml_node}
## <小紙條>
## [1] <收件人>大元</收件人>
## [2] <發件人>小張</發件人>
## [3] <主題>問候</主題>
## [4] <具體內容>早啊,飯吃了沒? </具體內容></pre>
</td>
<td>
<p><img src="Semi-Structured-Data_files/figure-html/unnamed-chunk-11-1.png" width="384" /></p>
</td>
</tr>
</table>
</article></slide><slide class=""><hgroup><h2>XML中的移動</h2></hgroup><article id="xml-11">
<ul>
<li>透過上述的要領,只要給我們一個節點,我們即可從該節點開始遊走整棵樹</li>
<li>如何快速定位出我們要的節點?</li>
</ul>
</article></slide><slide class=""><hgroup><h2>XPath與XML的樹狀結構</h2></hgroup><article id="xpathxml-2">
<ul>
<li><a href='https://en.wikipedia.org/wiki/XPath' title=''>XPath</a>透過樹狀結構與屬性,幫助我們快速的從XML中找到節點</li>
</ul>
<pre ><小紙條>
<收件人>大元</收件人>
<發件人>小張</發件人>
<主題>問候</主題>
<具體內容>早啊,飯吃了沒? </具體內容>
</小紙條></pre>
<ul>
<li>根:<code>/小紙條</code></li>
<li><code>小紙條</code>下的<code>主題</code>:<code>/小紙條/主題</code></li>
<li>所有的主題:<code>//主題</code></li>
</ul>
</article></slide><slide class=""><hgroup><h2>XPath範例</h2></hgroup><article id="xpath">
<table class="formatter">
<tr>
<td>
<ul>
<li><code>xml_find_first</code>回傳一個node</li>
</ul>
<pre class = 'prettyprint lang-r'>xml_find_first(doc, "/小紙條/主題")</pre>
<pre >## {xml_node}
## <主題></pre>
</td>
<td>
<p><img src="Semi-Structured-Data_files/figure-html/unnamed-chunk-13-1.png" width="384" /></p>
</td>
</tr>
</table>
</article></slide><slide class=""><hgroup><h2>XPath範例</h2></hgroup><article id="xpath-1">
<table class="formatter">
<tr>
<td>
<ul>
<li><code>xml_find_all</code>回傳一個nodeset</li>
</ul>
<pre class = 'prettyprint lang-r'>xml_find_all(doc, "/小紙條/主題")</pre>
<pre >## {xml_nodeset (1)}
## [1] <主題>問候</主題></pre>
</td>
<td>
<p><img src="Semi-Structured-Data_files/figure-html/unnamed-chunk-15-1.png" width="384" /></p>
</td>
</tr>
</table>
</article></slide><slide class=""><hgroup><h2>範例:政府採購資料網的解析</h2></hgroup><article id="section-4">
<pre class = 'prettyprint lang-r'>tmp.path <- tempfile(fileext = ".html")
download.file("http://homepage.ntu.edu.tw/~wush978/rdataengineer/0080400004.html", destfile = tmp.path)
browseURL(tmp.path)
x <- read_html(tmp.path)</pre>
</article></slide><slide class=""><hgroup><h2>範例:找出中間表格中的資料名稱</h2></hgroup><article id="section-5">
<ul>
<li><code>機關代碼</code>、<code>機關名稱</code>等標籤內容,代表的是右邊的標籤內容的「資料名稱」</li>
<li>透過瀏覽器,我們發現兩者同是<code>tr</code>標籤底下的<code>th</code>與<code>td</code>
<ul>
<li>「資料名稱」是<code>th</code>標籤的內容</li>
<li>「資料內容」是<code>td</code>標籤的內容</li>
</ul></li>
<li>利用XPath直接找出所有<code>tr</code>底下的<code>th</code></li>
</ul>
<pre class = 'prettyprint lang-r'>. <- xml_find_all(x, "//tr/th")
. <- sapply(., xml_text)
head(.)</pre>
<pre >## [1] "機關代碼" "機關名稱" "單位名稱" "機關地址" "聯絡人" "聯絡電話"</pre>
<pre class = 'prettyprint lang-r'>tail(.)</pre>
<pre >## [1] "總決標金額"
## [2] "總決標金額是否公開"
## [3] "契約是否訂有依物價指數調整價金規定"
## [4] "未列物價調整規定說明"
## [5] "履約執行機關"
## [6] "附加說明"</pre>
</article></slide><slide class=""><hgroup><h2>範例:找出中間表格中的資料內容</h2></hgroup><article id="section-6">
<ul>
<li>直接用XPath找出所有的f<code>tr</code>底下的<code>td</code></li>
</ul>
<pre class = 'prettyprint lang-r'>th <- xml_find_all(x, "//tr/th")
td <- xml_find_all(x, "//tr/td")
length(th)</pre>
<pre >## [1] 116</pre>
<pre class = 'prettyprint lang-r'>length(td)</pre>
<pre >## [1] 214</pre>
<ul>
<li><code>td</code>太多了</li>
</ul>
</article></slide><slide class=""><hgroup><h2>範例:找出中間表格中的資料內容</h2></hgroup><article id="section-7">
<ul>
<li>直接用XPath找出所有的<code>th</code>旁邊的<code>td</code></li>
</ul>
<pre class = 'prettyprint lang-r'>th <- xml_find_all(x, "//tr/th")
td <- xml_find_all(x, "//tr/th/../td")
length(th)</pre>
<pre >## [1] 116</pre>
<pre class = 'prettyprint lang-r'>length(td)</pre>
<pre >## [1] 116</pre>
</article></slide><slide class=""><hgroup><h2>找出「機關名稱」</h2></hgroup><article id="section-8">
<pre class = 'prettyprint lang-r'>th.text <- sapply(th, xml_text)
td.text <- sapply(td, xml_text)
td.text <- trimws(td.text)
td.text[th.text == "機關名稱"]</pre>
<pre >## [1] "台灣電力股份有限公司"</pre>
</article></slide><slide class=""><hgroup><h2>找出「標案名稱」</h2></hgroup><article id="section-9">
<pre class = 'prettyprint lang-r'>td.text <- trimws(td.text)
td.text[th.text == "標案名稱"]</pre>
<pre >## [1] "套管插頭等壹批"</pre>
</article></slide><slide class=""><hgroup><h2>隨堂練習</h2></hgroup><article id="section-10">
<ul>
<li>找出投標公司的統編</li>
<li>找出得標公司的統邊</li>
<li>找出所有和查詢有關的連結其背後的網址</li>
</ul></article></slide>
<slide class="backdrop"></slide>
</slides>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
<!-- map slide visiblity events into shiny -->
<script>
(function() {
if (window.jQuery) {
window.jQuery(document).on('slideleave', function(e) {
window.jQuery(e.target).trigger('hidden');
});
window.jQuery(document).on('slideenter', function(e) {
window.jQuery(e.target).trigger('shown');
});
}
})();
</script>
</body>
</html>