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 2edf3d9 commit 38040ba
Show file tree
Hide file tree
Showing 10 changed files with 1,741 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6fcaad57
f4105744
5 changes: 4 additions & 1 deletion listings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
},
{
"listing": "/units/d1-02-structure.html",
"items": []
"items": [
"/materials/d1-02-structure/ex-1.html",
"/materials/d1-02-structure/codealong-1.html"
]
},
{
"listing": "/schedule.html",
Expand Down
2 changes: 1 addition & 1 deletion materials/d1-01-welcome/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <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" alt="Eric Nantz" width="70%" data-fig-align="center">
<div id="fig-539a35d47e664c97a50115a146a7f1bd-1" class="quarto-figure quarto-figure-center" width="70%" alt="Eric Nantz" data-fig-align="center">
<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">
Expand Down
813 changes: 813 additions & 0 deletions materials/d1-02-structure/codealong-1.html

Large diffs are not rendered by default.

736 changes: 736 additions & 0 deletions materials/d1-02-structure/ex-1.html

Large diffs are not rendered by default.

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-right="250" data-top="50" height="500px" width="500px" style="top: 50px; right: 250px; width: 500px; height: 500px; ">
<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; ">
<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
16 changes: 8 additions & 8 deletions schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ <h1 class="title">Workshop Schedule</h1>
</tr>
</thead>
<tbody class="list">
<tr data-index="0" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Welcome &amp; Setup" data-listing-filename-sort="d1-01-welcome.qmd">
<tr data-index="0" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Welcome &amp; Setup" data-listing-filename-sort="d1-01-welcome.qmd">
<td>
<span class="listing-subtitle">9:00 - 9:30</span>
</td>
Expand All @@ -217,7 +217,7 @@ <h1 class="title">Workshop Schedule</h1>
<span class="listing-author">Eric Nantz &amp; Michael Thomas</span>
</td>
</tr>
<tr data-index="1" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Application Structure" data-listing-filename-sort="d1-02-structure.qmd">
<tr data-index="1" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="32" data-listing-title-sort="Application Structure" data-listing-filename-sort="d1-02-structure.qmd">
<td>
<span class="listing-subtitle">9:30 - 10:30</span>
</td>
Expand All @@ -228,7 +228,7 @@ <h1 class="title">Workshop Schedule</h1>
<span class="listing-author">Eric Nantz &amp; Michael Thomas</span>
</td>
</tr>
<tr data-index="2" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="34" data-listing-title-sort="Coffee &amp; refreshments break" data-listing-filename-sort="d1-02b-break.qmd">
<tr data-index="2" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="34" data-listing-title-sort="Coffee &amp; refreshments break" data-listing-filename-sort="d1-02b-break.qmd">
<td>
<span class="listing-subtitle">10:30 - 11:00</span>
</td>
Expand All @@ -239,7 +239,7 @@ <h1 class="title">Workshop Schedule</h1>
<span class="listing-author">&nbsp;</span>
</td>
</tr>
<tr data-index="3" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Performance" data-listing-filename-sort="d1-03-performance.qmd">
<tr data-index="3" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Performance" data-listing-filename-sort="d1-03-performance.qmd">
<td>
<span class="listing-subtitle">TBD</span>
</td>
Expand All @@ -250,7 +250,7 @@ <h1 class="title">Workshop Schedule</h1>
<span class="listing-author">Eric Nantz &amp; Michael Thomas</span>
</td>
</tr>
<tr data-index="4" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="108" data-listing-title-sort="Lunch break" data-listing-filename-sort="d1-03b-lunch.qmd">
<tr data-index="4" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="108" data-listing-title-sort="Lunch break" data-listing-filename-sort="d1-03b-lunch.qmd">
<td>
<span class="listing-subtitle">12:30 - 13:30</span>
</td>
Expand All @@ -261,7 +261,7 @@ <h1 class="title">Workshop Schedule</h1>
<span class="listing-author">&nbsp;</span>
</td>
</tr>
<tr data-index="5" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Deployment &amp; Administration" data-listing-filename-sort="d1-04-deploy-admin.qmd">
<tr data-index="5" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Deployment &amp; Administration" data-listing-filename-sort="d1-04-deploy-admin.qmd">
<td>
<span class="listing-subtitle">TBD</span>
</td>
Expand All @@ -272,7 +272,7 @@ <h1 class="title">Workshop Schedule</h1>
<span class="listing-author">Eric Nantz &amp; Michael Thomas</span>
</td>
</tr>
<tr data-index="6" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="34" data-listing-title-sort="Coffee &amp; refreshments break" data-listing-filename-sort="d1-04b-break.qmd">
<tr data-index="6" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="34" data-listing-title-sort="Coffee &amp; refreshments break" data-listing-filename-sort="d1-04b-break.qmd">
<td>
<span class="listing-subtitle">15:00 - 15:30</span>
</td>
Expand All @@ -283,7 +283,7 @@ <h1 class="title">Workshop Schedule</h1>
<span class="listing-author">&nbsp;</span>
</td>
</tr>
<tr data-index="7" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694909910606" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Load Testing" data-listing-filename-sort="d1-9001-loadtesting.qmd">
<tr data-index="7" data-listing-date-sort="1694995200000" data-listing-file-modified-sort="1694914311791" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="27" data-listing-title-sort="Load Testing" data-listing-filename-sort="d1-9001-loadtesting.qmd">
<td>
<span class="listing-subtitle">TBD</span>
</td>
Expand Down
70 changes: 70 additions & 0 deletions search.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,27 @@
"section": "Usage Metrics",
"text": "Usage Metrics\nHow many users visited legobricksapp in last 28 days?\n\napp_guid &lt;- \"fba6896e-49e4-45c6-856f-03a3bc4f498f\"\ntime_start &lt;- Sys.Date() - lubridate::days(28)\nget_usage_shiny(\n client,\n content_guid = app_guid,\n limit = 100,\n from = time_start\n ) |&gt;\n pull(user_guid) |&gt;\n unique() |&gt;\n length()\n\n[1] 4\n\n\n\n\nposit-conf-2023.github.io/shiny-r-prod"
},
{
"objectID": "materials/d1-02-structure/ex-1.html",
"href": "materials/d1-02-structure/ex-1.html",
"title": "Value Metrics Module",
"section": "",
"text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called modules-exercise1."
},
{
"objectID": "materials/d1-02-structure/ex-1.html#access-instructions",
"href": "materials/d1-02-structure/ex-1.html#access-instructions",
"title": "Value Metrics Module",
"section": "",
"text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called modules-exercise1."
},
{
"objectID": "materials/d1-02-structure/ex-1.html#exercise-instructions",
"href": "materials/d1-02-structure/ex-1.html#exercise-instructions",
"title": "Value Metrics Module",
"section": "Exercise Instructions",
"text": "Exercise Instructions\nYour task is to create a new Shiny module that displays three important metrics to the user:\n\nTotal number of sets\nTotal number of parts among the sets\nTotal number of mini-figures\n\nNote that these quantities are dependent on the user selections from the inputs contained in the left sidebar (theme, year, and parts range).\nKeeping with the overall user interface style, you are recommended to use the value_box function from the {bslib} package. The metrics can be derived using the function below. In the application code, you will find reactive data frames called sets_rv and part_meta_rv which can be used in the parameters of the function below.\n#' Derive key LEGO data set metrics\n#' \n#' @param sets_rv data frame containing sets information\n#' @param part_meta_rv data frame containing parts metadata information\n#' \n#' @import dplyr\nderive_widget_metrics &lt;- function(sets_rv, part_meta_rv) {\n # number of sets\n n_sets &lt;- length(unique(sets_rv$set_num))\n\n # number of parts\n n_parts &lt;- sum(sets_rv$num_parts, na.rm = TRUE)\n\n # number of minifigs\n n_minifigs &lt;- part_meta_rv |&gt;\n summarize(total_minifigs = sum(minifig_ind)) |&gt;\n collect() |&gt;\n pull(total_minifigs)\n\n return(\n list(\n n_sets = n_sets,\n n_parts = n_parts,\n n_minifigs = n_minifigs\n )\n )\n}"
},
{
"objectID": "materials/setup-resources/index.html#section-15",
"href": "materials/setup-resources/index.html#section-15",
Expand Down Expand Up @@ -251,6 +272,20 @@
"section": "",
"text": "Warning\n\n\n\nThese slides are under construction and will be finalized prior to the workshop date.\n\n\nView slides in full screen"
},
{
"objectID": "units/d1-02-structure.html#code-along-examples",
"href": "units/d1-02-structure.html#code-along-examples",
"title": "Application Structure",
"section": "Code-Along Examples",
"text": "Code-Along Examples\n\n\n\n\n\nCode-Along\n\n\nTitle\n\n\n\n\n\n\n \n\n\nModules for LEGO attribute selections\n\n\n\n\n\nNo matching items"
},
{
"objectID": "units/d1-02-structure.html#exercises",
"href": "units/d1-02-structure.html#exercises",
"title": "Application Structure",
"section": "Exercises",
"text": "Exercises\n\n\n\n\n\nExercise\n\n\nTitle\n\n\n\n\n\n\n \n\n\nValue Metrics Module\n\n\n\n\n\nNo matching items"
},
{
"objectID": "units/d1-02b-break.html",
"href": "units/d1-02b-break.html",
Expand Down Expand Up @@ -643,6 +678,41 @@
"section": "To () or not to ()",
"text": "To () or not to ()\n\n\n# app server\nsets_rv &lt;- reactive({\n # processing\n})\n\nset_picker_server(\"mod1\", sets_rv)\n\nset_picker_server &lt;- function(id, sets_rv) {\n moduleServer(\n id,\n function(input, output, session) {\n # ...\n\n set_selection &lt;- reactive({\n input$set_num\n })\n\n set_selection\n }\n )\n}\n\n\n\nReactive parameters reference by name: sets_rv\nInside module, invoke reactive parameter as you would any other reactive in Shiny: sets_rv()\nAny reactive(s) returned by module should also be reference by name: set_selection, set_selection()\n\n\n\nposit-conf-2023.github.io/shiny-r-prod"
},
{
"objectID": "materials/d1-02-structure/codealong-1.html",
"href": "materials/d1-02-structure/codealong-1.html",
"title": "Modules for LEGO attribute selections",
"section": "",
"text": "As you make the transition to building production Shiny applications, Shiny modules are a very important tool to improve code organization and overall flow of your application. We will work together to build Shiny modules that let the user filter the underlying LEGO metadata based on a key variables in the overall data."
},
{
"objectID": "materials/d1-02-structure/codealong-1.html#requirements",
"href": "materials/d1-02-structure/codealong-1.html#requirements",
"title": "Modules for LEGO attribute selections",
"section": "Requirements",
"text": "Requirements\nCreste three inputs for the user to subset the LEGO metadata by the following key variables:\n\nTheme(s) associated with sets. Default should be all sets, but let the user customize selections with a search box.\nYear range for when set was created. Give the user a visual cue of how many sets are present in each year.\nPre-defined ranges for how many parts are present in each set. Ranges are the following:\n\nSmall (1-50 parts)\nMedium (51-200 parts)\nLarge (201 or more parts)\nAll sizes"
},
{
"objectID": "materials/d1-02-structure/codealong-1.html#data",
"href": "materials/d1-02-structure/codealong-1.html#data",
"title": "Modules for LEGO attribute selections",
"section": "Data",
"text": "Data\nThe following data sets included in the application contain the variables needed for the requirements (note that these snippets are a reduced sample of each source data set).\n\nsets\n\ndplyr::glimpse(sets)\n\n\n\nRows: 368\nColumns: 6\n$ set_num &lt;chr&gt; \"001-1\", \"002-1\", \"1030-1\", \"1038-1\", \"1039-1\", \"1237-1\", \"1…\n$ name &lt;chr&gt; \"Gears\", \"4.5V Samsonite Gears Motor Set\", \"TECHNIC I: Simpl…\n$ year &lt;dbl&gt; 1965, 1965, 1985, 1985, 1986, 2001, 1999, 1999, 1999, 1999, …\n$ theme_id &lt;dbl&gt; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …\n$ num_parts &lt;dbl&gt; 43, 3, 210, 120, 39, 56, 30, 29, 28, 26, 28, 103, 98, 64, 28…\n$ img_url &lt;chr&gt; \"https://cdn.rebrickable.com/media/sets/001-1.jpg\", \"https:/…\n\n\n\n\nthemes\n\ndplyr::glimpse(themes)\n\n\n\nRows: 30\nColumns: 3\n$ theme_id &lt;dbl&gt; 191, 708, 693, 398, 650, 234, 56, 604, 136, 736, 692, 676, 2…\n$ name &lt;chr&gt; \"Dark Forest\", \"The LEGO Batman Movie\", \"Monkie Kid\", \"FIRST…\n$ parent_id &lt;dbl&gt; 186, 697, NA, NA, 632, 233, 52, NA, 126, 501, 535, NA, 227, …"
},
{
"objectID": "materials/d1-02-structure/codealong-1.html#plan",
"href": "materials/d1-02-structure/codealong-1.html#plan",
"title": "Modules for LEGO attribute selections",
"section": "Plan",
"text": "Plan\n\nCreate a new module R script (and possible a supporting R script) by using golem::add_module() in the dev/02_dev.R script.\nPick a Shiny input type that matches our requirements.\nEnsure the server-side portion of the module returns the result of the selection, with additional post-processing if necessary.\nPlug in the UI and server-side portions of the module in the main app_ui.R and app_server.R files, respectively."
},
{
"objectID": "materials/d1-02-structure/codealong-1.html#solution-theme-picker",
"href": "materials/d1-02-structure/codealong-1.html#solution-theme-picker",
"title": "Modules for LEGO attribute selections",
"section": "Solution (Theme Picker)",
"text": "Solution (Theme Picker)\nCreate the module file with the following snippet:\n\ngolem::add_module(name = \"theme_picker\", with_test = FALSE)\n\nWhile we could choose a selectInput that displays the name of the theme as the choices and allow multiple to be selected, we want to incorporate a search box with snappy performance. The virtualSelectInput from the {shinyWidgets} package is an excellent solution.\nSince we have the themes data set available, we can also leverage the supporting function shinyWidgets::prepare_choices() to get the possible choices ready for the input. The module will simply return the selection as a reactive variable.\n\n# UI portion\nmod_theme_picker_ui &lt;- function(id, label = NULL) {\n ns &lt;- NS(id)\n\n themes &lt;- dplyr::arrange(themes, name)\n\n choices_list &lt;- shinyWidgets::prepare_choices(\n themes,\n label = name,\n value = theme_id\n )\n\n tagList(\n virtualSelectInput(\n ns(\"virt_theme_id\"),\n label = label,\n choices = choices_list,\n selected = themes$theme_id,\n multiple = TRUE,\n search = TRUE\n )\n )\n}\n\n# server portion\nmod_theme_picker_server &lt;- function(id){\n moduleServer( id, function(input, output, session){\n ns &lt;- session$ns\n\n return(reactive(input$virt_theme_id))\n })\n}\n\nAt the bottom of the module script, {golem} automatically includes commented code for referencing the module UI and server blocks in your main Shiny application. We can copy them into the app_ui.R and app_server.R files.\n\n# app_ui.R\nmod_theme_picker_ui(\"theme_picker_1\")\n\n# app_server.R\ninput_theme_ids &lt;- mod_theme_picker_server(\"theme_picker_1\")"
},
{
"objectID": "materials/profvis/index.html#what-is-profvis",
"href": "materials/profvis/index.html#what-is-profvis",
Expand Down
Loading

0 comments on commit 38040ba

Please sign in to comment.