Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 80 additions & 35 deletions slides/lesson6_slides.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link href="lesson6_slides_files/libs/quarto-html/light-border.css" rel="stylesheet">
<link href="lesson6_slides_files/libs/quarto-html/quarto-html.min.css" rel="stylesheet" data-mode="light">
<link href="lesson6_slides_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles"><meta charset="utf-8">
<meta name="generator" content="quarto-1.3.353">
<meta name="generator" content="quarto-1.5.57">

<title>Final class</title>
<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down Expand Up @@ -155,7 +155,8 @@
}

.callout.callout-titled .callout-body > .callout-content > :last-child {
margin-bottom: 0.5rem;
padding-bottom: 0.5rem;
margin-bottom: 0;
}

.callout.callout-titled .callout-icon::before {
Expand Down Expand Up @@ -353,17 +354,16 @@ <h2>In 6 weeks we have learned…</h2>
</ul>
</div>
</section>
<section id="cheatsheet" class="slide level2">
<h2>Cheatsheet</h2>
<p><a href="https://hutchdatascience.org/Intermediate_R/cheatsheet.html" class="uri">https://hutchdatascience.org/Intermediate_R/cheatsheet.html</a></p>
</section>
<section id="continuing-your-education" class="slide level2">
<h2>Continuing your education</h2>
<ul>
<li>Advanced R</li>
</ul>
<div class="fragment">
<ul>
<li><a href="https://hutchdatascience.org/usergroups/">R Users Group</a></li>
<li><a href="https://ocdo.fredhutch.org/dasl/courses/bioconductor/">Bioconductor for Genomics course in the Spring</a></li>
</ul>
</div>
<div class="fragment">
<!-- -->
<ul>
<li><p>Reference texts:</p>
<ul>
Expand All @@ -372,23 +372,28 @@ <h2>Continuing your education</h2>
<li><p><a href="https://r-graphics.org/">R Graphics Cookbook, by Winston Chang</a></p></li>
</ul></li>
</ul>
</div>
</section>
<section id="connecting-to-rest-of-dasl" class="slide level2">
<h2>Connecting to rest of DaSL…</h2>

<img data-src="images/dasl_outreach.png" class="r-stretch"></section>
<ul>
<li><p><a href="https://ocdo.fredhutch.org/programs/dhc.html">Data House Calls</a></p></li>
<li><p><a href="https://forms.office.com/r/YPxrxaw421">Building Computational Workflows Workshop, March 11 at noon</a></p></li>
</ul>
</section>
<section id="certification" class="slide level2">
<h2>Certification</h2>
<p>You need to complete 4 out of 5 exercises - I’ll been keeping track <a href="https://docs.google.com/spreadsheets/d/1v2eMrqTt6aiXurwklSODzrMqagziAcU8TEeeJauYryU/edit?gid=0#gid=0">here</a>.</p>
</section>
<section id="please-fill-out-survey" class="slide level2">
<h2>Please fill out survey!</h2>
<p>Our <a href="https://forms.gle/DWH6WTe7o6nzhgHW7">class survey</a> makes a huge difference for us.</p>
<p>Our <a href="https://forms.gle/Hc82MVnswsisXqot5">class survey</a> makes a huge difference for us.</p>
</section>
<section id="last-but-not-leaststickers" class="slide level2">
<h2>Last but not least…stickers!</h2>
<p><img data-src="https://2953482177-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M38c0s4s0YCM6dGwrz1%2F-M7RetZBh2Wf7TnfLhKs%2F-M7RkjP-fqIgI8ZsDmKh%2Ftidyverse2.png?alt=media&amp;token=73bf5842-1ae0-4ca4-8622-ec2ae9063a7a" width="350"> <img data-src="images/Intro_To_R_2.png" width="350"></p>
<p><img data-src="images/Intermediate_R_V3.png" width="350"><img data-src="images/student_stickers.jpg" width="350"></p>
<p>Make your own sticker, add it to the wall of DaSL students!</p>
<section id="section" class="slide level2">
<h2></h2>
<div class="quarto-auto-generated-content">
<div class="footer footer-default">

</div>
</div>
</section>
</div>
Expand Down Expand Up @@ -417,7 +422,6 @@ <h2>Last but not least…stickers!</h2>
Reveal.initialize({
'controlsAuto': true,
'previewLinksAuto': false,
'smaller': true,
'pdfSeparateFragments': false,
'autoAnimateEasing': "ease",
'autoAnimateDuration': 1,
Expand Down Expand Up @@ -634,18 +638,7 @@ <h2>Last but not least…stickers!</h2>
}
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) {
const onCopySuccess = function(e) {
// button target
const button = e.trigger;
// don't keep focus
Expand Down Expand Up @@ -677,11 +670,50 @@ <h2>Last but not least…stickers!</h2>
}, 1000);
// clear code selection
e.clearSelection();
}
const getTextToCopy = function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
text: getTextToCopy
});
function tippyHover(el, contentFn) {
clipboard.on('success', onCopySuccess);
if (window.document.getElementById('quarto-embedded-source-code-modal')) {
// For code content inside modals, clipBoardJS needs to be initialized with a container option
// TODO: Check when it could be a function (https://github.com/zenorocha/clipboard.js/issues/860)
const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
text: getTextToCopy,
container: window.document.getElementById('quarto-embedded-source-code-modal')
});
clipboardModal.on('success', onCopySuccess);
}
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):not(.about-link)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
content: contentFn,
maxWidth: 500,
delay: 100,
arrow: false,
Expand All @@ -691,8 +723,17 @@ <h2>Last but not least…stickers!</h2>
interactive: true,
interactiveBorder: 10,
theme: 'light-border',
placement: 'bottom-start'
placement: 'bottom-start',
};
if (contentFn) {
config.content = contentFn;
}
if (onTriggerFn) {
config.onTrigger = onTriggerFn;
}
if (onUntriggerFn) {
config.onUntrigger = onUntriggerFn;
}
config['offset'] = [0,0];
config['maxWidth'] = 700;
window.tippy(el, config);
Expand All @@ -706,7 +747,11 @@ <h2>Last but not least…stickers!</h2>
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const findCites = (el) => {
Expand Down
6 changes: 6 additions & 0 deletions slides/lesson6_slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ format:

## Cheatsheet

<https://hutchdatascience.org/Intermediate_R/cheatsheet.html>

## Continuing your education

- [Bioconductor for Genomics course in the Spring](https://ocdo.fredhutch.org/dasl/courses/bioconductor/)
Expand All @@ -44,6 +46,10 @@ format:

- [Building Computational Workflows Workshop, March 11 at noon](https://forms.office.com/r/YPxrxaw421)

## Certification

You need to complete 4 out of 5 exercises - I'll been keeping track [here](https://docs.google.com/spreadsheets/d/1v2eMrqTt6aiXurwklSODzrMqagziAcU8TEeeJauYryU/edit?gid=0#gid=0).

## Please fill out survey!

Our [class survey](https://forms.gle/Hc82MVnswsisXqot5) makes a huge difference for us.
Expand Down
4 changes: 2 additions & 2 deletions slides/lesson6_slides_files/libs/quarto-html/popper.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
/*# sourceMappingURL=0a6b880beb84f9b6f36107a76f82c5b1.css.map */

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

Large diffs are not rendered by default.

Empty file.
Empty file modified slides/lesson6_slides_files/libs/revealjs/plugin/math/katex.js
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ window.QuartoLineHighlight = function () {
divSourceCode.forEach((el) => {
if (el.hasAttribute(kCodeLineNumbersAttr)) {
const codeLineAttr = el.getAttribute(kCodeLineNumbersAttr);
el.removeAttribute("data-code-line-numbers");
el.removeAttribute(kCodeLineNumbersAttr);
if (handleLinesSelector(deck, codeLineAttr)) {
// Only process if attr is a string to select lines to highlights
// e.g "1|3,6|8-11"
Expand Down Expand Up @@ -165,17 +165,17 @@ window.QuartoLineHighlight = function () {
if (typeof highlight.last === "number") {
spanToHighlight = [].slice.call(
codeBlock.querySelectorAll(
":scope > span:nth-child(n+" +
":scope > span:nth-of-type(n+" +
highlight.first +
"):nth-child(-n+" +
"):nth-of-type(-n+" +
highlight.last +
")"
)
);
} else if (typeof highlight.first === "number") {
spanToHighlight = [].slice.call(
codeBlock.querySelectorAll(
":scope > span:nth-child(" + highlight.first + ")"
":scope > span:nth-of-type(" + highlight.first + ")"
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ window.QuartoSupport = function () {
return /print-pdf/gi.test(window.location.search);
}

// helper for theme toggling
function toggleBackgroundTheme(el, onDarkBackground, onLightBackground) {
if (onDarkBackground) {
el.classList.add('has-dark-background')
} else {
el.classList.remove('has-dark-background')
}
if (onLightBackground) {
el.classList.add('has-light-background')
} else {
el.classList.remove('has-light-background')
}
}

// implement controlsAudo
function controlsAuto(deck) {
const config = deck.getConfig();
Expand Down Expand Up @@ -111,8 +125,19 @@ window.QuartoSupport = function () {
}
}

// add footer text
function addFooter(deck) {
// tweak slide-number element
function tweakSlideNumber(deck) {
deck.on("slidechanged", function (ev) {
const revealParent = deck.getRevealElement();
const slideNumberEl = revealParent.querySelector(".slide-number");
const onDarkBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-dark-background');
const onLightBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-light-background');
toggleBackgroundTheme(slideNumberEl, onDarkBackground, onLightBackground);
})
}

// add footer text
function addFooter(deck) {
const revealParent = deck.getRevealElement();
const defaultFooterDiv = document.querySelector(".footer-default");
if (defaultFooterDiv) {
Expand All @@ -127,13 +152,17 @@ window.QuartoSupport = function () {
prevSlideFooter.remove();
}
const currentSlideFooter = ev.currentSlide.querySelector(".footer");
const onDarkBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-dark-background')
const onLightBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-light-background')
if (currentSlideFooter) {
defaultFooterDiv.style.display = "none";
const slideFooter = currentSlideFooter.cloneNode(true);
handleLinkClickEvents(deck, slideFooter);
deck.getRevealElement().appendChild(slideFooter);
toggleBackgroundTheme(slideFooter, onDarkBackground, onLightBackground)
} else {
defaultFooterDiv.style.display = "block";
toggleBackgroundTheme(defaultFooterDiv, onDarkBackground, onLightBackground)
}
});
}
Expand Down Expand Up @@ -272,6 +301,23 @@ window.QuartoSupport = function () {
}
}

function handleWhiteSpaceInColumns(deck) {
for (const outerDiv of window.document.querySelectorAll("div.columns")) {
// remove all whitespace text nodes
// whitespace nodes cause the columns to be misaligned
// since they have inline-block layout
//
// Quarto emits no whitespace nodes, but third-party tooling
// has bugs that can cause whitespace nodes to be emitted.
// See https://github.com/quarto-dev/quarto-cli/issues/8382
for (const node of outerDiv.childNodes) {
if (node.nodeType === 3 && node.nodeValue.trim() === "") {
outerDiv.removeChild(node);
}
}
}
}

return {
id: "quarto-support",
init: function (deck) {
Expand All @@ -280,11 +326,13 @@ window.QuartoSupport = function () {
fixupForPrint(deck);
applyGlobalStyles(deck);
addLogoImage(deck);
tweakSlideNumber(deck);
addFooter(deck);
addChalkboardButtons(deck);
handleTabbyClicks();
handleSlideChanges(deck);
workaroundMermaidDistance(deck);
handleWhiteSpaceInColumns(deck);
},
};
};
Loading