-
Notifications
You must be signed in to change notification settings - Fork 1
/
20230524_DigiDataDay.html
378 lines (300 loc) · 10.6 KB
/
20230524_DigiDataDay.html
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Embrace the graph! | DigiDataDay 2023</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/mhra.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
<!-- Custom styles -->
<link rel="stylesheet" href="slide-styles.css">
</head>
<body>
<div class="reveal">
<!-- Captions -->
<cap
style="position: absolute; bottom: 12vh; left: 0px; width: 100%; z-index:500; text-align: center; font-size: 1.4vw; font-style: italic; color: #65625e; font-family: 'Courier New', Courier, monospace;">
</cap>
<!-- Footer left -->
<div class="footer-left">
<img src="./static/images/mhra/digidataday2.png" alt="" style="height: 2vh;">
<img src="./static/images/logos/niras.svg" alt="">
</div>
<!-- Slides -->
<div class="slides">
<!-- Front page -->
<section>
<h1>Embrace the graph!</h1>
<img src="./static/images/mhra/digidataday.png" style="height: 8vh;">
<p style="font-size: 0.8em;">https://bit.ly/3W3IA7i</p>
<p style="font-size: 0.5em;">By Mads Holten Rasmussen</p>
</section>
<!-- What is a graph -->
<section>
<section>
<h1>Graphs?</h1>
</section>
<section data-background-image="./static/images/mhra/edu/diagram_vs_graph1.svg" data-background-size="50%">
</section>
<section data-background-image="./static/images/mhra/edu/diagram_vs_graph2.svg" data-background-size="90%">
</section>
<section data-background-image="./static/images/mhra/edu/diagram_vs_graph3.svg" data-background-size="90%">
</section>
<section data-background-image="./static/images/mhra/edu/diagram_vs_graph4.svg" data-background-size="90%">
<div class="box">directed graph</div>
</section>
</section>
<!-- When to use? -->
<section>
<section>
<h1>When to use graphs?</h1>
</section>
<section>
<h3>When the relationships are the most important part of the dataset</h3>
</section>
<section data-background-image="./static/images/mhra/edu/who_uses_graphs.svg" data-background-size="80%">
</section>
<section data-background-image="./static/images/Neptune-Diagram_knowledge-graph1.svg"
data-background-size="70%" data-state="neptune">
<style>
.neptune cap:after {
content: "Amazon Neptune: https://aws.amazon.com/neptune";
}
</style>
</section>
<section>
<table>
<tr>
<th>ID</th>
<th>Time</th>
<th>Value</th>
</tr>
<tr>
<td>2345</td>
<td>2023-05-15T07:07:00Z</td>
<td>21.3</td>
</tr>
<tr>
<td>2346</td>
<td>2023-05-15T07:08:00Z</td>
<td>70.1</td>
</tr>
</table>
<p class="center box fragment fade-in">Use a time series database!</p>
</section>
<section
data-background-image="./static/images/mhra/edu/database-types.jpg"
data-background-size="60%"
data-state="db-types">
<style>
.db-types cap:after {
content: "https://www.nextplatform.com/2018/09/19/the-graph-database-poised-to-pounce-on-the-mainstream/";
}
</style>
</section>
</section>
<!-- Graphs vs tables -->
<section>
<section>
<h2>Graphs vs. tables</h2>
</section>
<section>
<img data-src="./static/images/logos/W3C.svg"></img>
<h2>RDF: Resource Description Framework</h2>
</section>
<section data-background-image="./static/images/SPO.svg" data-background-size="120vw">
</section>
<section data-background-image="./static/images/SPO2.svg" data-background-size="120vw">
</section>
<section>
<h2>But how do we get from tables to graphs?</h2>
</section>
<section data-background-image="./static/images/RDF-en-simple-01.svg">
</section>
<section data-background-image="./static/images/RDF-en-simple-02.svg">
</section>
<section data-background-image="./static/images/RDF-en-simple-03.svg">
</section>
<section data-background-image="./static/images/RDF-en-simple-04.svg">
</section>
<section data-background-image="./static/images/RDF-en-simple-05.svg" data-background-size="80%">
</section>
<section data-background-image="./static/images/RDF-en-simple-06.svg" data-background-size="80%">
</section>
<section data-background-image="./static/images/RDF-en-simple-07.svg" data-background-size="80%">
</section>
<section
data-background-image="./static/images/mhra/edu/rdb-graph.png"
data-background-size="60%"
data-state="rdb-graph">
<style>
.rdb-graph cap:after {
content: "https://www.slideshare.net/lyonwj/natural-language-processing-with-graph-databases-and-neo4j";
}
</style>
</section>
</section>
<!-- Querying the graph -->
<section>
<section>
<h1>Querying the graph</h1>
</section>
<section data-background-image="./static/images/Neptune-Diagram_knowledge-graph1.svg"
data-background-size="70%" data-state="neptune">
<style>
.neptune cap:after {
content: "Amazon Neptune: https://aws.amazon.com/neptune";
}
</style>
</section>
<section data-background-image="./static/images/Neptune-Diagram_knowledge-graph2.svg"
data-background-size="70%" data-state="neptune">
</section>
<section data-background-image="./static/images/Neptune-Diagram_knowledge-graph3.svg"
data-background-size="70%" data-state="neptune">
</section>
<section>
<h2>Querying the graph is as easy as decribing a path along its edges</h2>
</section>
<!-- SPARQL -->
<section>
<img data-src="./static/images/logos/W3C.svg"></img>
<h2>SPARQL: SPARQL Protocol and RDF Query Language</h2>
</section>
<section
data-background-iframe="./static/interactive/sparql-visualizer/Neptune/index.html?file=./assets/neptune-simple.json&fs=true"
data-background-interactive>
</section>
<section
data-background-iframe="./static/interactive/sparql-visualizer/Neptune/index.html?file=./assets/neptune-simple.json&fs=true&tab=5"
data-background-interactive>
</section>
<section data-background-image="./static/images/mhra/mads-mikkelsen.png" data-background-size="50%">
<a href="https://madsholten.github.io/graph-sparql/" target="_blank">graph SPARQL</a>
</section>
<!-- Mads Mikkelsen -->
<section>
<pre><code data-trim class="sparql hljs" data-line-numbers="|3-14|3-4|6|8-9|11-12|14|1">
SELECT DISTINCT ?coActorName ?age
WHERE {
?movie dbo:starring ?theActor .
?movie dbo:starring ?otherActor .
?theActor rdfs:label "Mads Mikkelsen"@en .
?otherActor rdfs:label ?coActorName .
?otherActor dbo:birthDate ?bd .
BIND( NOW() as ?today )
BIND( YEAR(?today)-YEAR(?bd) as ?age )
FILTER(LANG(?coActorName) = "en")
}
</code></pre>
</section>
<section data-background-iframe="https://bit.ly/3W2e1Pv">
<a href="https://bit.ly/3W2e1Pv" target="_blank">https://dbpedia.org/sparql</a>
</section>
</section>
<!-- ChatGPT to graph -->
<section>
<section>
<h1>Make ChatGPT build the knowledge graph</h1>
</section>
<section>
<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:7052548169544425472" height="949" width="504" frameborder="0" allowfullscreen="" title="Indlejret indlæg"></iframe>
</section>
</section>
<!-- Combination of databases -->
<section>
<section>
<h1>Use in combination</h1>
</section>
<section data-background-iframe="https://www.w3.org/TR/vocab-ssn/"></section>
<section data-background-image="./static/images/mhra/ssn-sosa-bot-ex.svg" data-background-size="80%">
<a href="https://bit.ly/3Oamvlt" target="_blank">https://bit.ly/3Oamvlt</a>
</section>
<section>
<table>
<tr>
<th>ID</th>
<th>Time</th>
<th>Value</th>
</tr>
<tr>
<td>2345</td>
<td>2023-05-15T07:07:00Z</td>
<td>21.3</td>
</tr>
<tr>
<td>2346</td>
<td>2023-05-15T07:08:00Z</td>
<td>70.1</td>
</tr>
<tr>
<td>2345</td>
<td>2023-05-15T07:09:00Z</td>
<td>21.2</td>
</tr>
<tr>
<td>2346</td>
<td>2023-05-15T07:10:00Z</td>
<td>70.4</td>
</tr>
<tr>
<td>2345</td>
<td>2023-05-15T07:07:00Z</td>
<td>21.3</td>
</tr>
<tr>
<td>2346</td>
<td>2023-05-15T07:08:00Z</td>
<td>70.2</td>
</tr>
<tr>
<td>2345</td>
<td>2023-05-15T07:09:00Z</td>
<td>21.2</td>
</tr>
<tr>
<td>2346</td>
<td>2023-05-15T07:10:00Z</td>
<td>70.1</td>
</tr>
</table>
</section>
</section>
<section>
<section>
<h1>Key takeaways</h1>
<ul>
<li>Logical data model (like you would draw it on a board)</li>
<li>Faster than RDBs for deep relationships</li>
<li>You can use multiple standards to annotate your data</li>
<li>Not the right choise for all kinds of data</li>
</ul>
</section>
<section>
<h1>Learn more</h1>
<ul>
<li><a href="https://lbd-hackers.github.io/slides/LBD-school_1.html" target="_blank">LBD School lecture 1</a></li>
</ul>
</section>
</section>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/reveal.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/notes/notes.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/markdown/markdown.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2/plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes]
});
</script>
</body>
</html>