Skip to content

Commit

Permalink
small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Sep 17, 2023
1 parent e68662c commit 1f0b64e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
7 changes: 4 additions & 3 deletions slides/02-intro_to_shiny.html
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ <h2>Your turn - Exercise 01</h2>
</ul>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_58ddb0d4" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_7d7c4182" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">−</button><button class="countdown-bump-up">+</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down Expand Up @@ -2009,15 +2009,16 @@ <h2>A brief widget tour</h2>
</section>
<section id="your-turn---exercise-02" class="slide level2">
<h2>Your turn - Exercise 02</h2>
<p>We’ve just seen a number of alternative input widgets, starting from the code in <code>exercises/ex02.R</code> try changing the <code>radioButton()</code> input to something else.</p>
<p>We’ve just seen a number of alternative input widgets.</p>
<p>Starting from the code in <code>exercises/ex02.R</code> try changing the <code>radioButton()</code> input to something else.</p>
<p>What happens if you use an input capable of selecting multiple values</p>
<ul>
<li><p>e.g. <code>checkboxGroupInput()</code></p></li>
<li><p>or <code>selectInput(multiple = TRUE)</code>?</p></li>
</ul>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_dba4b217" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_ffa97dd5" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">−</button><button class="countdown-bump-up">+</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">06</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down
4 changes: 3 additions & 1 deletion slides/02-intro_to_shiny.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ From [Mastering Shiny](https://mastering-shiny.org/action-layout.html#multi-row)

## Your turn - Exercise 02

We've just seen a number of alternative input widgets, starting from the code in `exercises/ex02.R` try changing the `radioButton()` input to something else.
We've just seen a number of alternative input widgets.

Starting from the code in `exercises/ex02.R` try changing the `radioButton()` input to something else.

What happens if you use an input capable of selecting multiple values

Expand Down
11 changes: 6 additions & 5 deletions slides/03-reactivity.html
Original file line number Diff line number Diff line change
Expand Up @@ -1991,15 +1991,16 @@ <h2>Reactive graph</h2>
</section>
<section id="your-turn---exercise-03" class="slide level2">
<h2>Your turn - Exercise 03</h2>
<p>Starting with the code in <code>exercises/ex03.R</code> (base on <code>demo02.R</code>’s code) add a <code>tableOutput()</code> to the app’s <code>mainPanel()</code>.</p>
<p>Once you have done that you should then add logic to the <code>server</code> function to render a table that shows the daily min and max temperature for each day of the week.</p>
<p>Start with the code in <code>exercises/ex03.R</code> (based on <code>demo02.R</code>’s code)<br>
Add a <code>tableOutput()</code> to the app’s <code>mainPanel()</code>.</p>
<p>Once you have done that, add logic to the <code>server</code> function to render a table that shows the daily min and max temperature for each day of the week.</p>
<ul>
<li>You will need to use <code>renderTable()</code></li>
<li><code>lubridate::wday()</code> will be useful along with <code>group_by()</code> &amp; <code>summarize()</code></li>
</ul>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_8b510f49" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_25004d0e" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">−</button><button class="countdown-bump-up">+</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">09</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down Expand Up @@ -2405,7 +2406,7 @@ <h2>Your turn - Exercise 04</h2>
<p><em>Hint</em> - think about what inputs / reactives would make the most sense to use for this.</p>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_0cf1d1f7" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_b724cc3b" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">−</button><button class="countdown-bump-up">+</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">09</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down Expand Up @@ -2728,7 +2729,7 @@ <h2>Your turn - Exercise 05</h2>
<p><em>Hint</em> - remember that anywhere that uses either <code>d</code> or <code>d_vars</code> will now need to use <code>d()</code> and <code>d_vars()</code> instead.</p>
<div class="cell">
<div class="cell-output-display">
<div class="countdown" id="timer_b97817d4" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_e3f33e8d" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">−</button><button class="countdown-bump-up">+</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">09</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down
5 changes: 3 additions & 2 deletions slides/03-reactivity.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ flowchart LR

## Your turn - Exercise 03

Starting with the code in `exercises/ex03.R` (base on `demo02.R`'s code) add a `tableOutput()` to the app's `mainPanel()`.
Start with the code in `exercises/ex03.R` (based on `demo02.R`'s code) \
Add a `tableOutput()` to the app's `mainPanel()`.

Once you have done that you should then add logic to the `server` function to render a table that shows the daily min and max temperature for each day of the week.
Once you have done that, add logic to the `server` function to render a table that shows the daily min and max temperature for each day of the week.

- You will need to use `renderTable()`
- `lubridate::wday()` will be useful along with `group_by()` & `summarize()`
Expand Down

0 comments on commit 1f0b64e

Please sign in to comment.