From 950cef9c724974e68037d3241017d8cdd0e710d6 Mon Sep 17 00:00:00 2001 From: Tracy Teal Date: Sat, 24 Aug 2024 09:58:40 -0700 Subject: [PATCH 1/2] changing u1-d01-welcome slides to Quarto --- course-materials/_slides/setup.Rmd | 11 +- .../_slides/u1-d01-welcome/u1-d01-welcome.Rmd | 327 +++-- .../u1-d01-welcome/u1-d01-welcome.html | 1303 ++++++++++++----- 3 files changed, 1141 insertions(+), 500 deletions(-) diff --git a/course-materials/_slides/setup.Rmd b/course-materials/_slides/setup.Rmd index b5b7893c..65baeff7 100644 --- a/course-materials/_slides/setup.Rmd +++ b/course-materials/_slides/setup.Rmd @@ -28,9 +28,6 @@ dev.off <- function(){ # conflicted library(conflicted) conflict_prefer("filter", "dplyr") -# xaringanExtra -library(xaringanExtra) -xaringanExtra::use_panelset() # output number of lines hook_output <- knitr::knit_hooks$get("output") knitr::knit_hooks$set(output = function(x, options) { @@ -54,12 +51,6 @@ knitr::knit_hooks$set(output = function(x, options) { }) ``` -layout: true - - + --- diff --git a/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.Rmd b/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.Rmd index d7a24fdf..ff2a2943 100644 --- a/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.Rmd +++ b/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.Rmd @@ -2,47 +2,50 @@ title: "Welcome!" subtitle: "

Data Science in a Box" author: "[datasciencebox.org](https://datasciencebox.org/)" -output: - xaringan::moon_reader: +format: + revealjs: css: ["../xaringan-themer.css", "../slides.css"] - lib_dir: libs - nature: - ratio: "16:9" - highlightLines: true - highlightStyle: solarized-light - countIncrementalSlides: false + highlight-style: a11y + slide-number: true + footer: "https://datasciencebox.org" --- -```{r child = "../setup.Rmd"} +```{r} +#| child = "../setup.Rmd" ``` -```{r packages, echo=FALSE, message=FALSE, warning=FALSE} +```{r} +#| label = "packages", +#| echo = FALSE, +#| message = FALSE, +#| warning = FALSE library(tidyverse) library(emo) -packageVersion("xaringan") ``` -class: middle # Hello world! ---- -## Data science +## Data science {.smaller} + +:::: {.columns} +::: {.column width="70%"} -.pull-left-wide[ - Data science is an exciting discipline that allows you to turn raw data into understanding, insight, and knowledge. - We're going to learn to do this in a `tidy` way -- more on that later! - This is a course on introduction to data science, with an emphasis on statistical thinking. -] ---- +::: +:::: + +## Course FAQ {.smaller} -## Course FAQ +:::: {.columns} +::: {.column width="70%"} -.pull-left-wide[ **Q - What data science background does this course assume?** A - None. @@ -51,13 +54,17 @@ A - While statistics $\ne$ data science, they are very closely related and have **Q - Will we be doing computing?** A - Yes. -] ---- +::: +:::: + + + +## Course FAQ {.smaller} -## Course FAQ +:::: {.columns} +::: {.column width="80%"} -.pull-left-wide[ **Q - Is this an intro CS course?** A - No, but many themes are shared. @@ -66,99 +73,141 @@ A - R. **Q: Why not language X?** A: We can discuss that over `r emo::ji("coffee")`. -] ---- +::: +:::: + -class: middle # Software ---- +## -```{r echo=FALSE, out.width="75%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "75%", +#| fig.align = "left" knitr::include_graphics("img/excel.png") ``` ---- +## -```{r echo=FALSE, out.width="50%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "50%", +#| fig.align = "left" knitr::include_graphics("img/r.png") ``` ---- +## -```{r echo=FALSE, out.width="73%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "73%", +#| fig.align = "left" knitr::include_graphics("img/rstudio.png") ``` ---- - -class: middle # Data science life cycle ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.001.png") ``` ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.002.png") ``` ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.003.png") ``` ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.004.png") ``` ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.005.png") ``` ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.006.png") ``` ---- +## -.pull-left[ -```{r echo=FALSE, out.width="75%", fig.align="left"} +:::: {.columns} +::: {.column} +```{r} +#| echo = FALSE, +#| out.width = "75%", +#| fig.align = "left" knitr::include_graphics("img/google-trend-index.png") ``` -] -.pull-right[ -```{r echo=FALSE, out.width="90%", fig.align="right"} +::: + +::: {.column} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "right" knitr::include_graphics("img/data-science-cycle/data-science-cycle.006.png") ``` -] +::: +:::: ---- +## -.pull-left[ -```{r echo=FALSE, out.width="75%", fig.align="left"} +:::: {.columns} +::: {.column} +```{r} +#| echo = FALSE, +#| out.width = "75%", +#| fig.align = "left" knitr::include_graphics("img/google-trend-index.png") ``` -] -.pull-right[ -```{r echo=FALSE, out.width="90%", fig.align="right"} +::: + +::: {.column} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "right" knitr::include_graphics("img/data-science-cycle/data-science-cycle.006.png") ``` -```{r echo=FALSE} +```{r} +#| echo = FALSE travel <- tribble( ~date, ~season, "23 January 2017", "winter", @@ -169,154 +218,162 @@ travel <- tribble( ) travel ``` -] +::: +:::: ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.007.png") ``` ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.008.png") ``` ---- +## -```{r echo=FALSE, out.width="90%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "90%", +#| fig.align = "left" knitr::include_graphics("img/data-science-cycle/data-science-cycle.009.png") ``` ---- +## -```{r echo=FALSE, out.width="85%", fig.align="left"} +```{r} +#| echo = FALSE, +#| out.width = "85%", +#| fig.align = "left" knitr::include_graphics("img/unvotes/unvotes.gif") ``` ---- - -class: middle - -# Let's dive in! - ---- +# Let's dive in! -background-image: url("img/unvotes/unvotes-01.jpeg") +## {background-image="img/unvotes/unvotes-01.jpeg"} ---- -class: inverse +## -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-02.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-03.jpeg") ``` ---- +## -class: inverse - -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-04.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-05.jpeg") ``` ---- +## -class: inverse - -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-06.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-07.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="90%"} +```{r} +#| echo = FALSE, +#| out.width = "90%" knitr::include_graphics("img/unvotes/unvotes-08.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="90%"} +```{r} +#| echo = FALSE, +#| out.width = "90%" knitr::include_graphics("img/unvotes/unvotes-09.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="90%"} +```{r} +#| echo = FALSE, +#| out.width = "90%" knitr::include_graphics("img/unvotes/unvotes-10.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="90%"} +```{r} +#| echo = FALSE, +#| out.width = "90%" knitr::include_graphics("img/unvotes/unvotes-11.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="90%"} +```{r} +#| echo = FALSE, +#| out.width = "90%" knitr::include_graphics("img/unvotes/unvotes-12.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-13.jpeg") ``` ---- - -class: inverse +## -```{r echo=FALSE, out.width="100%"} +```{r} +#| echo = FALSE, +#| out.width = "100%" knitr::include_graphics("img/unvotes/unvotes-14.jpeg") ``` ---- +## -.center[ -.large[ +:::{style="text-align: center;"} [minecr.shinyapps.io/unvotes](https://minecr.shinyapps.io/unvotes/) -] -] +::: -```{r echo=FALSE, out.width="65%"} +```{r} +#| echo = FALSE, +#| out.width = "65%" knitr::include_graphics("img/unvotes/unvotes-15.png") ``` diff --git a/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.html b/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.html index bfc63263..7429ab7f 100644 --- a/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.html +++ b/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.html @@ -1,422 +1,1015 @@ - - - Welcome! - - - - - - - - - - - - - - - - - + + + + - - - - + const toggleBodyColorPrimary = () => { + const bsSheetEl = window.document.querySelector("link#quarto-bootstrap"); + if (bsSheetEl) { + toggleBodyColorMode(bsSheetEl); + } + } + toggleBodyColorPrimary(); + const tabsets = window.document.querySelectorAll(".panel-tabset-tabby") + tabsets.forEach(function(tabset) { + const tabby = new Tabby('#' + tabset.id); + }); + const isCodeAnnotation = (el) => { + for (const clz of el.classList) { + if (clz.startsWith('code-annotation-')) { + return true; + } + } + return false; + } + const clipboard = new window.ClipboardJS('.code-copy-button', { + text: function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + }); + clipboard.on('success', function(e) { + // button target + const button = e.trigger; + // don't keep focus + button.blur(); + // flash "checked" + button.classList.add('code-copy-button-checked'); + var currentTitle = button.getAttribute("title"); + button.setAttribute("title", "Copied!"); + let tooltip; + if (window.bootstrap) { + button.setAttribute("data-bs-toggle", "tooltip"); + button.setAttribute("data-bs-placement", "left"); + button.setAttribute("data-bs-title", "Copied!"); + tooltip = new bootstrap.Tooltip(button, + { trigger: "manual", + customClass: "code-copy-button-tooltip", + offset: [0, -8]}); + tooltip.show(); + } + setTimeout(function() { + if (tooltip) { + tooltip.hide(); + button.removeAttribute("data-bs-title"); + button.removeAttribute("data-bs-toggle"); + button.removeAttribute("data-bs-placement"); + } + button.setAttribute("title", currentTitle); + button.classList.remove('code-copy-button-checked'); + }, 1000); + // clear code selection + e.clearSelection(); + }); + var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); + var mailtoRegex = new RegExp(/^mailto:/); + var filterRegex = new RegExp('/' + window.location.host + '/'); + var isInternal = (href) => { + return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href); + } + // Inspect non-navigation links and adorn them if external + var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)'); + for (var i=0; i { + const parentEl = el.parentElement; + if (parentEl) { + const cites = parentEl.dataset.cites; + if (cites) { + return { + el, + cites: cites.split(' ') + }; + } else { + return findCites(el.parentElement) + } + } else { + return undefined; + } + }; + var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]'); + for (var i=0; i + + + \ No newline at end of file From 86643e83653e06fab88695555f751d2d24a36efc Mon Sep 17 00:00:00 2001 From: Tracy Teal Date: Sat, 24 Aug 2024 10:04:00 -0700 Subject: [PATCH 2/2] renaming to qmd --- .../u1-d01-welcome/{u1-d01-welcome.Rmd => u1-d01-welcome.qmd} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename course-materials/_slides/u1-d01-welcome/{u1-d01-welcome.Rmd => u1-d01-welcome.qmd} (100%) diff --git a/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.Rmd b/course-materials/_slides/u1-d01-welcome/u1-d01-welcome.qmd similarity index 100% rename from course-materials/_slides/u1-d01-welcome/u1-d01-welcome.Rmd rename to course-materials/_slides/u1-d01-welcome/u1-d01-welcome.qmd