Skip to content

Commit b0de888

Browse files
committed
crops volcano out of app structure figures
1 parent 2ab3b71 commit b0de888

23 files changed

Lines changed: 1108 additions & 31 deletions

File tree

.quarto/listing/listing-cache.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
],
5757
"summer-schools\\v2024\\slides\\slides.Rmd": [
5858
"B3049D40"
59+
],
60+
"index.qmd": [
61+
"posts"
5962
]
6063
}
6164
}

_freeze/posts/2025-07-06-CSEE-intro-shiny/index/execute-results/html.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 1013 additions & 8 deletions
Large diffs are not rendered by default.

docs/listings.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,24 @@
9898
{
9999
"listing": "/summer-schools/v2024/slides/slides.html",
100100
"items": []
101+
},
102+
{
103+
"listing": "/index.html",
104+
"items": [
105+
"/posts/2025-07-06-CSEE-intro-shiny/index.html",
106+
"/posts/2022-05-19-introduction-to-microbiome-analysis/index.html",
107+
"/posts/2021-11-02-introduction-to-gams/index.html",
108+
"/posts/2021-06-22-introduction-to-shiny-apps/index.html",
109+
"/posts/2021-07-19-glm-community-ecology/index.html",
110+
"/posts/2021-05-04-building-r-packages/index.html",
111+
"/posts/2021-03-25-point-count-data-analysis/index.html",
112+
"/posts/2021-01-22-introduction-aux-concepts-edi-en-contexte-scientifique/index.html",
113+
"/posts/2021-01-12-4-day-training-in-spatial-statistics-with-philippe-marchand/index.html",
114+
"/posts/2020-12-07-making-websites-with-hugo/index.html",
115+
"/posts/2020-09-21-data-visualization/index.html",
116+
"/posts/2020-06-15-science-communication/index.html",
117+
"/posts/2020-04-28-sensibilisation-aux-ralits-autochtones-et-recherche-collaborative/index.html",
118+
"/posts/2020-01-14-mathematical-modeling-in-ecology-and-evolution/index.html"
119+
]
101120
}
102121
]
-64.6 KB
Loading
-85.6 KB
Loading
81.4 KB
Loading

docs/posts/2025-07-06-CSEE-intro-shiny/index.html

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,36 +1000,65 @@ <h3 class="anchored" data-anchor-id="building-blocks">Building blocks</h3>
10001000
<section id="ids" class="level3">
10011001
<h3 class="anchored" data-anchor-id="ids">IDs</h3>
10021002
<p>The <strong>user interface</strong> and <strong>server</strong> communicate through IDs that we assign to inputs from the user and outputs from the server.</p>
1003-
<div id="fig-appids" class="quarto-layout-panel">
1003+
<div id="fig-appids" class="quarto-layout-panel" width="400">
10041004
<figure class="figure">
10051005
<div class="quarto-layout-row quarto-layout-valign-top">
10061006
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
1007-
<p><img src="images/app-ids.png" class="img-fluid figure-img" alt="app-ids"> <img src="images/app_01_simple.PNG" class="img-fluid figure-img" alt="app_01_simple"></p>
1007+
<p><img src="images/app-ids.png" class="img-fluid figure-img" style="width:50.0%" alt="app-ids"> <img src="images/app_01_simple.PNG" class="img-fluid figure-img" style="width:50.0%" alt="app_01_simple"></p>
10081008
</div>
10091009
</div>
1010-
<p></p><figcaption class="figure-caption">Figure&nbsp;1: <strong>?(caption)</strong></figcaption><p></p>
1010+
<p></p><figcaption class="figure-caption">Figure&nbsp;1: Shiny apps use identifiers (“id”) to link a visual element in the UI to objects on the server. The programmer chooses the names for these IDs. Here the colour (orange or blue) indicates different IDs; in a real app the orange squares would both be the same ID (e.g.&nbsp;<code>user_selection</code>) and the blue squares would both be a different id (e.g.&nbsp;<code>app_output</code>).</figcaption><p></p>
10111011
</figure>
10121012
</div>
1013-
<p>We use an ID (<em>in orange</em>) to link the user input in the UI to the reactive values used in the server:</p>
1013+
<p>We use an ID (<em>in orange</em>) to link the user input in the UI to the reactive values used in the server</p>
10141014
<div id="fig-appids-reactive" class="quarto-layout-panel">
10151015
<figure class="figure">
10161016
<div class="quarto-layout-row quarto-layout-valign-top">
10171017
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
1018-
<p><img src="images/app-ids.png" class="img-fluid figure-img" alt="app-ids"> <img src="images/app_01_simple_input.PNG" class="img-fluid figure-img" alt="app_01_simple"></p>
1018+
<p><img src="images/app-ids.png" class="img-fluid figure-img" alt="app-ids"> <img src="images/app_01_simple_input.png" class="img-fluid figure-img" alt="app_01_simple"></p>
10191019
</div>
10201020
</div>
1021-
<p></p><figcaption class="figure-caption">Figure&nbsp;2: <strong>?(caption)</strong></figcaption><p></p>
1021+
<p></p><figcaption class="figure-caption">Figure&nbsp;2: The orange-coloured ID refers to the selection dropdown. In the UI portion it refers to the visual element the user interacts with. In the server portion it refers to the value given by the user.</figcaption><p></p>
10221022
</figure>
10231023
</div>
10241024
<p>We use another ID (<em>in blue</em>) to link the output created in the server to the output shown in the user interface:</p>
1025-
<p><img src="images/app-output.png" class="img-fluid"></p>
1025+
<div id="fig-appids-reactive" class="quarto-layout-panel">
1026+
<figure class="figure">
1027+
<div class="quarto-layout-row quarto-layout-valign-top">
1028+
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
1029+
<p><img src="images/app-ids.png" class="img-fluid figure-img" alt="app-ids"> <img src="images/app_01_simple_output.png" class="img-fluid figure-img" alt="app_01_simple"> The blue-coloured ID refers to the network figure. In the UI portion it refers to the plot image that the user sees. In the server portion it refers to the R object created by the <code>renderSomething</code> function.</p>
1030+
</div>
1031+
</div>
1032+
<p></p><figcaption class="figure-caption">Figure&nbsp;3: <strong>?(caption)</strong></figcaption><p></p>
1033+
</figure>
1034+
</div>
10261035
</section>
10271036
<section id="organisation" class="level3">
10281037
<h3 class="anchored" data-anchor-id="organisation">Organisation</h3>
10291038
<p>These elements can all be placed in one script named <code>app.R</code> or separately in scripts named <code>ui.R</code> and <code>server.R</code>. The choice is up to you, although it becomes easier to work in separate <code>ui.R</code> and <code>server.R</code> scripts when the Shiny app becomes more complex.</p>
1030-
<p><strong>Example 1: Everything in <code>app.R</code></strong></p>
1031-
<p><img src="images/app-in1.png" class="img-fluid"> <strong>Example 2: Split things into <code>ui.R</code> and <code>server.R</code></strong></p>
1032-
<p><img src="images/app-in2.png" class="img-fluid"></p>
1039+
<div id="fig-org" class="quarto-layout-panel">
1040+
<figure class="figure">
1041+
<div class="quarto-layout-row quarto-layout-valign-top">
1042+
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
1043+
<div class="quarto-figure quarto-figure-center">
1044+
<figure class="figure">
1045+
<p><img src="images/app-in1.png" class="img-fluid figure-img"></p>
1046+
<figcaption class="figure-caption">Example 1: Everything in <code>app.R</code></figcaption>
1047+
</figure>
1048+
</div>
1049+
</div>
1050+
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
1051+
<div class="quarto-figure quarto-figure-center">
1052+
<figure class="figure">
1053+
<p><img src="images/app-in2.png" class="img-fluid figure-img"></p>
1054+
<figcaption class="figure-caption">Example 2: Split things into <code>ui.R</code> and <code>server.R</code></figcaption>
1055+
</figure>
1056+
</div>
1057+
</div>
1058+
</div>
1059+
<p></p><figcaption class="figure-caption">Figure&nbsp;4: Shiny apps can be created in a single file or split into two for easier organization</figcaption><p></p>
1060+
</figure>
1061+
</div>
10331062
</section>
10341063
</section>
10351064
<section id="plots" class="level2" data-number="7">
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)