-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.qmd
422 lines (248 loc) · 11.1 KB
/
index.qmd
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
---
format:
revealjs:
theme: simple
transition: slide
background-transition: fade
scrollable: true
css: assets/custom.css
slide-number: true
self-contained: true
---
## RECHERCHE REPRODUCTIBLE {background-color="#292929"}
en écologie numérique
<br/> <br/> CESAB, le 02-12-2024
<br/> <br/>

## Qui je suis ? {data-background-image="assets/surprise_paysage.jpg" data-background-opacity=0.4}
::: incremental
- chercheur (IRD)
- écologue (marin)
- récifs coralliens
- écologie fonctionnelle
- écologie numérique
:::
<br/> <br/>
francois.guilhaumon\@ird.fr / fguilhaumon.github.io
# Recherche reproductible ? {background-color="#292929"}
# Un exemple {background-color="#292929"}
## {background-color="black"}
{fig-align="center"}
## {background-color="black" transition="fade-out"}
{fig-align="center"}
## {background-color="#f2f2f2"}
{fig-align="center"}
## {background-color="black"}
<br/> <br/> <br/> <br/> 
## {background-color="black"}
{fig-align="center"}
<br/> <br/>
[[Goodman et al. (2014) PLoS Comput Biol 10(4): e1003542. doi:10.1371/journal.pcbi.1003542](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003542)]{.small}
##
<br/> <br/> <br/> <br/> <br/> Galillée relate une expérience scientifique au bout de laquelle on abouti tous à la conclusion que Io, Europe, Ganymède et Callisto sont en orbite autour de Jupiter.
## {background-color="black"}
::: columns
::: {.column width="60%"}
<br/> <br/> <br/> 
:::
::: {.column width="40%"}
Les notes de Galillée intègrent:
- Données (dessins)
- Méta-données, matériel (date, météo, carac. lunette)
- Con[Texte]{.blue} (description des méthodes, analyses et conclusions)
:::
:::
## Recherche reproductible {auto-animate="true" auto-animate-easing="ease-in-out"}
<br/> <br/>
::: r-hstack
::: {.fragment data-id="box1" auto-animate-delay="0" style="background: #1db1c2; width: 300px; height: 200px; margin: 10px; display: flex; justify-content: center; align-items: center;"}
données
:::
::: {.fragment data-id="box2" auto-animate-delay="0.1" style="background: #e8c32e; width: 300px; height: 200px; margin: 10px; display: flex; justify-content: center; align-items: center;"}
code
:::
::: {.fragment data-id="box3" auto-animate-delay="0.2" style="background: #a8b035; width: 300px; height: 200px; margin: 10px; display: flex; justify-content: center; align-items: center;"}
documentation
:::
:::
## Recherche reproductible {auto-animate="true" auto-animate-easing="ease-in-out"}
<br/> <br/>
::: r-stack
::: {data-id="box1" style="background: #1db1c2; width: 700px; height: 400px; border-radius: 50px;"}
:::
::: {data-id="box2" style="background: #e8c32e; width: 600px; height: 300px; border-radius: 50px;"}
:::
::: {data-id="box3" style="background: #a8b035; width: 500px; height: 200px; border-radius: 50px; display: flex; justify-content: center; align-items: center;"}
Recherche Reproductible
:::
:::
## Un nouveau paradigme
<br/>
::: incremental
- les financeurs (ANR, Europe) et les revues le demandent (accéssibilité des données et du code, science ouverte)
- ~~si je garde mes données et mon code, j'ai un avantage compétitif~~
- si je partage mes données et mon code, mon travail aura plus de visibilité (et de citations)
:::
## Avantages
::: incremental
- Oblige à vérifier le travail (partage données + code)
- Votre [vous]{.blue} futur vous remerciera (vous serez bcp plus productif)
- Vos collaborateurs aussi
- En étant reproductible vous renforcez votre crédibilité et votre réputation
- La reproductibilité favorise la confiance dans la démarche scientifique
- Un [progrès scientifique plus rapide]{.blue}
:::
# il faut accepter de coder un minimum ...
<!--## il faut accepter de coder un minimum ... {data-background-image="assets/surprise_fg.jpg"}-->
## il faut accepter de coder un minimum ...
{fig-align="center"}
# Comment ?
##
{height="400" fig-align="center"}
[depuis Galillée le concept a un peu évolué ...]{.center}
## L'article
::: r-stack
{.fragment width="450"}
{.fragment width="400"} {.fragment width="400"}
{.fragment width="350"}
:::
## {data-background-image="assets/iceberg.png"}
<br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>
[Un article publié n'est que le sommet de l'iceberg que représente le processus de recherche ...]{.white}
##
<br/> <br/> <br/>
> "An article about computational results is advertising, not scholarship. The actual scholarship\* is the full software environment, code and data, that produced the result."
[Claerbout and Karrenbach 1992.]{.small}
<br/> <br/>
\*érudition
## Les concepts
[Wilson et al. 2016. Plos Comp Biol. <https://arxiv.org/pdf/1609.00037.pdf>]{.small}
::: incremental
- [Project Organization : Organisation des fichiers]{.green}
- [Data management : Gestion des données]{.green}
- [Software : Structure du code & Cohérence du flux d'analyses]{.green}
- [Tracking Changes : Gestion des versions de fichiers]{.green}
- [Collaboration]{.green}
- [Manuscripts]{.green}
:::
## [Project Organization]{.green}
<br/>
"Organizing the digital artifacts of a project to ease discovery and understanding."
<br/> <br/> <br/>
::: fragment
Organiser tous les fichiers relatifs à un projet selon une structure cohérente (et standardisée ...).
:::
## {background-color="#636363" background-image="assets/folder_mess_cooking.png"}
## [Project Organization]{.green}
<br/> <br/>
Research compendium
## {background-color="#636363" background-image="assets/folder_tidy_cooking.png"}
## [Data management]{.green}
<br/>
"Saving both raw and intermediate forms; documenting all steps; creating tidy data amenable to analysis."
## [Data management]{.green}
> - Sauvegarder les données initiales en l'état.
> - Coder l'acquisition des données au maximum (API, fonction 'download.file' de R).
> - Toute transformation des données sera codée, cela devient un résultat.
> - Générer des données "bien rangées", telles que vous voudriez les recevoir ([tidy]{.green})
## Tidy data
{fig-align="center"}
## [Software]{.green}
<br/>
Writing, organizing, and sharing scripts and programs used in an analysis.
## [Software]{.green}
Le code, les scripts
> - Respecter au maximum les conventions de code de votre communauté, <https://style.tidyverse.org/>
> - Peut importe la convention adoptée, rester constant !
> - Chemins relatifs ! Toujours !
> - Pas d'espaces, d'accents ni de MAJUSCULES !
> - Commenter/documenter ([les fonctions]{.green}, les scripts)
## [Software]{.green}
{fig-align="center"}
## [Software]{.green}
L'environnement logiciel
> - Les packages (versions !), la version de R (e.g. stringAsFactors = FALSE depuis 4.0, '\|\>' depuis 4.1): utiliser le package [renv]{.blue}
> - et les bibliothèques système, la version de l'OS ?
> - Docker (Rocker pour R), permet de créer une image de l'environnement de travail (OS, bibliothèques système, R, packages) (c'est faisable !)
## [Software]{.green}
Le "workflow" (enchaînement des scripts, des logiciels).
{fig-align="center"}
## [Software]{.green}
Le "workflow" (enchaînement des scripts, des logiciels).
<br/>
{width="50%" fig-align="center"}
> - il existe des outils pour ça (script R, package [targets]{.blue})
## [Tracking Changes]{.green}
<br/>
Archiver l'évolution de divers composants de notre projet.
::: columns
::: column
::: fragment

:::
:::
::: column
::: fragment

:::
:::
:::
## [Tracking Changes]{.green}
Utiliser un logiciel de gestion de versions ([**Git**]{.blue}).
{fig-align="center"}
## {data-background-image="assets/capure_rstudio-git.png"}
## [Collaboration]{.green}
<br/>
Faciliter la compréhension des projets de recherche : permettre la [contribution]{.blue}, la [vérification]{.blue}, la [synthèse]{.blue} et la [progression]{.blue}.
## [Collaboration]{.green}
<br/>
> - conventions de code
> - documentation de l'archive de recherche (README, license, code de contribution)
> - plateforme de collaboration en ligne (intègre Git !) : github, gitlab
## [Manuscripts]{.green}
<br/>
Writing manuscripts in a way that leaves an audit trail and minimizes manual merging of conflict.
## [Manuscripts]{.green}
<br/>
Utiliser la programmation lettrée (literate programming)
<br/>
<blockquote>Au lieu de considérer que notre tâche principale est de dire à un ordinateur ce qu'il doit faire, appliquons-nous plutôt à expliquer à des êtres humains ce que nous voulons que l'ordinateur fasse.</blockquote>
[Donald Knuth, années 70]{.reference}
## [Manuscripts]{.green}
<br/>
Utiliser la programmation lettrée (literate programming)
<br/>
<blockquote>Au lieu de passer des nuits entières à reformater des titres, insérer et renuméroter des figures et des tableaux, on ferait mieux de se concentrer sur la pertinence de son intro ou de sa discussion.</blockquote>
## [Manuscripts]{.green}
[Quarto]{.blue} (<https://quarto.org>)
{fig-align="center"}
## [Manuscripts]{.green}
En markdown le texte est formaté en utilisant des balises très simples comme les \_ ou les \*
{fig-align="center"}
## [Manuscripts]{.green}
<br/>
Comment ça marche Quarto ?
{fig-align="center"}
## [Manuscripts]{.green}
Formats d'export de Quarto (pandoc)
{width="50%" fig-align="center"}
## Program
:::{.small}
+---------------+-------------------------------------------------+
| **Monday** | - Project organization & Good practices |
| | - Version control w/ Git (Part I) |
+---------------+-------------------------------------------------+
| **Tuesday** | - Version control w/ Git (Part II) |
| | - Collaboration & sharing w/ GitHub |
+---------------+-------------------------------------------------+
| **Wednesday** | - Literate programming w/ Quarto |
| | - Pipeline optimization w/ targets |
| | - Developing an R package |
+---------------+-------------------------------------------------+
| **Thursday** | - Freezing package versions w/ renv |
| | - Containerization w/ Docker |
| | - Subgroups projects |
+---------------+-------------------------------------------------+
| **Friday** | - Subgroups projects |
+---------------+-------------------------------------------------+
:::