Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Sep 17, 2023
1 parent 38040ba commit 6baa870
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f4105744
61705b62
4 changes: 2 additions & 2 deletions materials/d1-01-welcome/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,15 @@ <h2>Workshop Policies</h2>
<h2>Meet the Team!</h2>
<div class="columns">
<div class="column" style="width:50%;">
<div id="fig-539a35d47e664c97a50115a146a7f1bd-1" class="quarto-figure quarto-figure-center" width="70%" alt="Eric Nantz" data-fig-align="center">
<div id="fig-539a35d47e664c97a50115a146a7f1bd-1" class="quarto-figure quarto-figure-center" data-fig-align="center" alt="Eric Nantz" width="70%">
<figure class="quarto-float quarto-float-fig">
<div>
<img data-src="assets/img/people/enantz.jpg" id="fig-539a35d47e664c97a50115a146a7f1bd-1" class="quarto-figure-center" style="width:70.0%" alt="Eric Nantz">
</div>
</figure>
</div>
</div><div class="column" style="width:50%;">
<div id="fig-539a35d47e664c97a50115a146a7f1bd-2" class="quarto-figure quarto-figure-center" alt="Michael Thomas" data-fig-align="center">
<div id="fig-539a35d47e664c97a50115a146a7f1bd-2" class="quarto-figure quarto-figure-center" data-fig-align="center" alt="Michael Thomas">
<figure class="quarto-float quarto-float-fig">
<div>
<img data-src="assets/img/people/mthomas.jpeg" id="fig-539a35d47e664c97a50115a146a7f1bd-2" class="quarto-figure-center" alt="Michael Thomas">
Expand Down
115 changes: 62 additions & 53 deletions materials/d1-02-structure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ <h1 class="title">Application Structure</h1>
<h2>It’s Never Just Shiny</h2>
<p>… at least for production-quality apps!</p>
<ul>
<li class="fragment">External data sources</li>
<li class="fragment">Connections to other execution backends</li>
<li class="fragment">Additional R packages!</li>
<li>External data sources</li>
<li>Connections to other execution backends</li>
<li>Additional R packages!</li>
</ul>
</section>
<section id="turned-upside-down" class="slide level2">
Expand Down Expand Up @@ -461,30 +461,30 @@ <h2>Take Control with <a href="https://rstudio.github.io/renv/"><code>{renv}</co
<p>Create <strong>r</strong>eproducible <strong>env</strong>ironments for your R projects.</p>
</blockquote>
<ul>
<li class="fragment">Next generation of <code>{packrat}</code></li>
<li class="fragment">Isolated package library from rest of your system</li>
<li class="fragment">Transfer projects to different collaborators / platforms</li>
<li class="fragment"><strong>Reproducible</strong> package installation</li>
<li class="fragment">Easily create new projects or convert existing projects with RStudio or built-in functions.</li>
<li>Next generation of <code>{packrat}</code></li>
<li>Isolated package library from rest of your system</li>
<li>Transfer projects to different collaborators / platforms</li>
<li><strong>Reproducible</strong> package installation</li>
<li>Easily create new projects or convert existing projects with RStudio or built-in functions.</li>
</ul>
</section>
<section id="under-the-hood" class="slide level2">
<h2>Under the Hood</h2>
<p>Upon initializing a project:</p>
<ol type="1">
<li class="fragment">Project-level <code>.Rprofile</code> to activate custom package library on startup</li>
<li class="fragment">Lockfile <code>renv.lock</code> to describe state of project library</li>
<li class="fragment"><code>renv/library</code> to hold private project library</li>
<li class="fragment"><code>renv/activate.R</code> performs activation</li>
<li>Project-level <code>.Rprofile</code> to activate custom package library on startup</li>
<li>Lockfile <code>renv.lock</code> to describe state of project library</li>
<li><code>renv/library</code> to hold private project library</li>
<li><code>renv/activate.R</code> performs activation</li>
</ol>
</section>
<section id="develop-a-routine" class="slide level2">
<h2>Develop a Routine</h2>
<p>Sticking with <code>{renv}</code> will pay off (trust me)</p>
<ul>
<li class="fragment">Fair play to mix packages from CRAN, GitHub, and proprietary sources</li>
<li class="fragment">Roll back when a package upgrade doesn’t play nicely</li>
<li class="fragment"><strong>You</strong> make the call when to update your library!</li>
<li>Fair play to mix packages from CRAN, GitHub, and proprietary sources</li>
<li>Roll back when a package upgrade doesn’t play nicely</li>
<li><strong>You</strong> make the call when to update your library!</li>
</ul>
</section>
<section>
Expand All @@ -496,17 +496,17 @@ <h1>Application Structure Options</h1>
<h2>A Single Point: <code>app.R</code></h2>
<p>Prototype apps can coast by with a single <code>app.R</code></p>
<ul>
<li class="fragment">More inputs, visualizations, modules, tabs …</li>
<li class="fragment">Eventually the <code>app.R</code> almost explodes</li>
<li class="fragment">Difficult to collaborate without conflicts</li>
<li>More inputs, visualizations, modules, tabs …</li>
<li>Eventually the <code>app.R</code> almost explodes</li>
<li>Difficult to collaborate without conflicts</li>
</ul>
</section>
<section id="r-directory" class="slide level2">
<h2><code>R</code> Directory</h2>
<ul>
<li class="fragment">Shiny supports auto-loading scripts in an <code>R</code> directory</li>
<li class="fragment">Nested directories not supported</li>
<li class="fragment">More information on the <a href="https://shiny.rstudio.com/articles/app-formats.html">App Formats</a> article</li>
<li>Shiny supports auto-loading scripts in an <code>R</code> directory</li>
<li>Nested directories not supported</li>
<li>More information on the <a href="https://shiny.rstudio.com/articles/app-formats.html">App Formats</a> article</li>
</ul>
</section>
<section id="enter-the-golem" class="slide level2">
Expand All @@ -515,9 +515,9 @@ <h2>Enter the <a href="https://thinkr-open.github.io/golem/"><code>{golem}</code
<p>Opinionated framework for building production-grade Shiny applications as <strong>R packages</strong></p>
</blockquote>
<ul>
<li class="fragment">Scripts guide you with first steps akin to <code>{usethis}</code> &amp; <code>{devtools}</code></li>
<li class="fragment">Encourages Shiny best practices (especially <strong>modules</strong>)</li>
<li class="fragment">Streamlines deployment on multiple platforms</li>
<li>Scripts guide you with first steps akin to <code>{usethis}</code> &amp; <code>{devtools}</code></li>
<li>Encourages Shiny best practices (especially <strong>modules</strong>)</li>
<li>Streamlines deployment on multiple platforms</li>
</ul>
<aside class="notes">
<ul>
Expand Down Expand Up @@ -588,9 +588,9 @@ <h2>{golem} project structure</h2>
<h2>Getting Started with {golem}</h2>
<p>Use helper functions in <code>dev/01_start.R</code> to…</p>
<ul>
<li class="fragment">Create <code>DESCRIPTION</code>, <code>README</code>, <code>LICENSE</code> (etc.) files</li>
<li class="fragment">Use git, tests</li>
<li class="fragment">Add your own favicon 🚀</li>
<li>Create <code>DESCRIPTION</code>, <code>README</code>, <code>LICENSE</code> (etc.) files</li>
<li>Use git, tests</li>
<li>Add your own favicon 🚀</li>
</ul>
<aside class="notes">
<ul>
Expand All @@ -612,9 +612,9 @@ <h2>Getting Started with {golem}</h2>
<h2>Developing with {golem}</h2>
<p>Use the helper functions in <code>dev/02_dev.R</code> to…</p>
<ul>
<li class="fragment">Add R package dependencies</li>
<li class="fragment">Create custom functions</li>
<li class="fragment">Add Shiny modules</li>
<li>Add R package dependencies</li>
<li>Create custom functions</li>
<li>Add Shiny modules</li>
</ul>
<div class="fragment">
<p>And use <code>dev/run_dev.R</code> to run your app</p>
Expand All @@ -639,14 +639,14 @@ <h2>Developing with {golem}</h2>
<h2>Deploying with {golem}</h2>
<p>Use the helper functions in <code>dev/03_deploy.R</code> to…</p>
<ul>
<li class="fragment">Check your R package ( <code>devtools::check()</code> )</li>
<li class="fragment">Build your R package ( <code>R CMD build mypackage</code> )</li>
<li class="fragment">Generate deployment files for
<li>Check your R package ( <code>devtools::check()</code> )</li>
<li>Build your R package ( <code>R CMD build mypackage</code> )</li>
<li>Generate deployment files for
<ul>
<li class="fragment">RStudio Connect</li>
<li class="fragment">Shinyapps.io</li>
<li class="fragment">Your own Shiny Server</li>
<li class="fragment">Dockerized deployments (e.g., ShinyProxy)</li>
<li>RStudio Connect</li>
<li>Shinyapps.io</li>
<li>Your own Shiny Server</li>
<li>Dockerized deployments (e.g., ShinyProxy)</li>
</ul></li>
</ul>
</section></section>
Expand All @@ -660,18 +660,18 @@ <h2>What are Modules?</h2>
<div class="fragment">
<h3 id="building-blocks-to-compose-any-shiny-app-out-of-smaller-more-understandable-pieces">Building blocks to compose any Shiny app out of smaller, more understandable pieces</h3>
<ul>
<li class="fragment">Avoids namespace collisions when using same widget across different areas of your app</li>
<li class="fragment">Allow you to encapsulate distinct app interfaces</li>
<li class="fragment">Organize code into logical and easy-to-understand components</li>
<li class="fragment">Facilitate collaboration</li>
<li>Avoids namespace collisions when using same widget across different areas of your app</li>
<li>Allow you to encapsulate distinct app interfaces</li>
<li>Organize code into logical and easy-to-understand components</li>
<li>Facilitate collaboration</li>
</ul>
</div>
</section>
<section id="sound-familiar" class="slide level2">
<h2>Sound familiar?</h2>
<ul>
<li class="fragment">R functions also help avoid collisions in variable names with general R code</li>
<li class="fragment">Essential for creating non-trivial and extensive workflows</li>
<li>R functions also help avoid collisions in variable names with general R code</li>
<li>Essential for creating non-trivial and extensive workflows</li>
</ul>
</section></section>
<section>
Expand Down Expand Up @@ -748,8 +748,8 @@ <h2>Anatomy of a Module (UI)</h2>
<span id="cb5-11"><a href="#cb5-11"></a>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div><div class="column" style="width:40%;">
<ul>
<li class="fragment"><code>id</code>: String to use for namespace</li>
<li class="fragment"><code>ns &lt;- NS(id)</code>: Create proper namespace function</li>
<li><code>id</code>: String to use for namespace</li>
<li><code>ns &lt;- NS(id)</code>: Create proper namespace function</li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -830,7 +830,7 @@ <h2 data-id="quarto-animate-title">Anatomy of a Module (Server)</h2>
</div>
</div>
<ul>
<li class="fragment">`<code>moduleServer()</code>: Encapsulate server-side logic with namespace applied.</li>
<li>`<code>moduleServer()</code>: Encapsulate server-side logic with namespace applied.</li>
</ul>
</section>
<section id="invoking-modules" class="slide level2">
Expand Down Expand Up @@ -868,9 +868,9 @@ <h2>Giving and Receiving</h2>
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div><div class="column" style="width:40%;">
<ul>
<li class="fragment">Reasonable inputs: static values, vectors, flags</li>
<li class="fragment">Avoid <strong>reactive</strong> parameters</li>
<li class="fragment">Return value: <code>tagList()</code> of inputs, output placeholders, and other UI elements</li>
<li>Reasonable inputs: static values, vectors, flags</li>
<li>Avoid <strong>reactive</strong> parameters</li>
<li>Return value: <code>tagList()</code> of inputs, output placeholders, and other UI elements</li>
</ul>
</div>
</div>
Expand All @@ -896,7 +896,7 @@ <h2>Giving and Receiving</h2>
<span id="cb11-17"><a href="#cb11-17" aria-hidden="true" tabindex="-1"></a> )</span>
<span id="cb11-18"><a href="#cb11-18" aria-hidden="true" tabindex="-1"></a>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<ul>
<li class="fragment">Input parameters (and return values) can be a mix of static and <strong>reactive</strong> objects</li>
<li>Input parameters (and return values) can be a mix of static and <strong>reactive</strong> objects</li>
</ul>
</section>
<section id="to-or-not-to" class="slide level2 smaller">
Expand Down Expand Up @@ -927,10 +927,19 @@ <h2>To () or not to ()</h2>
</div>
</div>
<ul>
<li class="fragment">Reactive parameters reference by <strong>name</strong>: <code>sets_rv</code></li>
<li class="fragment">Inside module, <strong>invoke</strong> reactive parameter as you would any other reactive in Shiny: <code>sets_rv()</code></li>
<li class="fragment">Any reactive(s) returned by module should also be reference by <strong>name</strong>: <code>set_selection</code>, <del><code>set_selection()</code></del></li>
<li>Reactive parameters reference by <strong>name</strong>: <code>sets_rv</code></li>
<li>Inside module, <strong>invoke</strong> reactive parameter as you would any other reactive in Shiny: <code>sets_rv()</code></li>
<li>Any reactive(s) returned by module should also be reference by <strong>name</strong>: <code>set_selection</code>, <del><code>set_selection()</code></del></li>
</ul>
</section></section>
<section>
<section id="code-along" class="title-slide slide level1 center" data-background-color="#17395c">
<h1>Code-Along</h1>
<p>Code-Along 1: Add a new Shiny module to pick themes</p>
</section>
<section id="your-turn-exercise-1" class="slide level2">
<h2>Your Turn: <a href="ex-1.html" target="_blank">Exercise 1</a></h2>
<p>Create a new Shiny module with LEGO data metrics!</p>

<div class="footer footer-default">
<p><a href="https://posit-conf-2023.github.io/shiny-r-prod">posit-conf-2023.github.io/shiny-r-prod</a></p>
Expand Down
2 changes: 1 addition & 1 deletion materials/d1-9001-loadtesting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ <h2>The log</h2>
{"type":"WS_SEND","begin":"2023-09-07T13:04:17.805Z","message":"[\"D#0|m|{\\\"method\\\":\\\"update\\\",\\\"data\\\":{\\\"n_parts_display\\\":\\\"20\\\"}}\"]"}
{"type":"WS_CLOSE","begin":"2023-09-07T13:04:35.561Z"}</code></pre>
<div class="fragment">
<div id="fig-539a35d47e664c97a50115a146a7f1bd-2" class="absolute quarto-figure quarto-figure-center" data-top="50" height="500px" width="500px" data-right="250" style="top: 50px; right: 250px; width: 500px; height: 500px; ">
<div id="fig-539a35d47e664c97a50115a146a7f1bd-2" class="absolute quarto-figure quarto-figure-center" width="500px" height="500px" data-top="50" data-right="250" style="top: 50px; right: 250px; width: 500px; height: 500px; ">
<figure class="quarto-float quarto-float-fig">
<div>
<img data-src="assets/img/confused_minifig.jpg" id="fig-539a35d47e664c97a50115a146a7f1bd-2" class="absolute" style="top: 50px; right: 250px; width: 500px; height: 500px; ">
Expand Down
Loading

0 comments on commit 6baa870

Please sign in to comment.