Skip to content

Commit

Permalink
Syllabi updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Nics-Github committed Sep 5, 2023
1 parent 8a4ef64 commit 32d7946
Show file tree
Hide file tree
Showing 16 changed files with 1,152 additions and 139 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ website:
- text: Syllabus
href: ./course-materials/syllabus/syllabus.html
- text: Schwab
href: course-materials/schwab.qmd
href: ./schwab.qmd
# - icon: fa-github fa-lg
# href: https://github.com/rudeboybert/SDS192

Expand Down
41 changes: 0 additions & 41 deletions course-materials/schwab.qmd

This file was deleted.

14 changes: 5 additions & 9 deletions course-materials/syllabus/syllabus.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ h1{font-weight: 400;}
- **Contact Info:**\
`r fontawesome::fa("at")` [nschwab\@smith.edu](mailto:[email protected])\
`r fontawesome::fa("phone")` 413-585-3440\
`r fontawesome::fa("github")` [Nics-Github](http://www.github.com/Nics-Github) `r fontawesome::fa("video")` [nschwab](https://smith.zoom.us/j/8227449694)
`r fontawesome::fa("github")` [Nics-Github](http://www.github.com/Nics-Github)
`r fontawesome::fa("video")` [nschwab](https://smith.zoom.us/j/8227449694)

- **Office location:** McConnell 213

Expand All @@ -58,20 +59,15 @@ Morning Section
Afternoon Section
- M: 1:40 AM - 11:55 / Sabin- Reed 301 WF: 1:20 AM - 12:35 / Sabin- Reed 301
- M: 1:40 AM - 11:55 / Sabin- Reed 301
- WF: 1:20 AM - 12:35 / Sabin- Reed 301
```

- **Getting help**:

- For non personal/sensitive questions, ask on the `#questions` channel on Slack. For personal/sensitive matters, Slack DM Professor Schwab.

- Prof. Schwab's student question hours:

- W 12:15 - 1:15 pm

- F 12:15 - 1:15 pm

- Request a zoom appointment.
- [Student hours](/course-materials/schwab.html)

- [Spinelli Center](https://www.smith.edu/academics/spinelli-center/tutoring)

Expand Down
164 changes: 143 additions & 21 deletions docs/course-materials/schwab.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.2.475">
<meta name="generator" content="quarto-1.3.353">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand All @@ -17,7 +17,7 @@
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
</style>
Expand Down Expand Up @@ -72,50 +72,52 @@
<span class="navbar-title">SDS 192 Fall ’23</span>
</a>
</div>
<div id="quarto-search" class="" title="Search"></div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../Resources.html">
<a class="nav-link" href="../Resources.html" rel="" target="">
<span class="menu-text">Resources</span></a>
</li>
<li class="nav-item compact">
<a class="nav-link" href="https://mdsr-book.github.io/mdsr2e/"><i class="bi bi-book" role="img">
<a class="nav-link" href="https://mdsr-book.github.io/mdsr2e/" rel="" target=""><i class="bi bi-book" role="img">
</i>
<span class="menu-text"></span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://moderndive.com/C-appendixC.html">
<a class="nav-link" href="https://moderndive.com/C-appendixC.html" rel="" target="">
<span class="menu-text">T &amp; T</span></a>
</li>
<li class="nav-item compact">
<a class="nav-link" href="https://www.slack.com"><i class="bi bi-slack" role="img">
<a class="nav-link" href="https://www.slack.com" rel="" target=""><i class="bi bi-slack" role="img">
</i>
<span class="menu-text"></span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="http://hcc-rstudiosrv1.hcc.edu:8787/auth-sign-in">
<a class="nav-link" href="http://hcc-rstudiosrv1.hcc.edu:8787/auth-sign-in" rel="" target="">
<span class="menu-text">R</span></a>
</li>
</ul>
<ul class="navbar-nav navbar-nav-scroll ms-auto">
<li class="nav-item compact">
<a class="nav-link" href="https://github.com/"><i class="bi bi-github" role="img">
<a class="nav-link" href="https://github.com/" rel="" target=""><i class="bi bi-github" role="img">
</i>
<span class="menu-text"></span></a>
</li>
<li class="nav-item">
<a class="nav-link" href=".././course-materials/syllabus/syllabus.html">
<a class="nav-link" href=".././course-materials/syllabus/syllabus.html" rel="" target="">
<span class="menu-text">Syllabus</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../course-materials/schwab.html" aria-current="page">
<a class="nav-link active" href="../course-materials/schwab.html" rel="" target="" aria-current="page">
<span class="menu-text">Schwab</span></a>
</li>
</ul>
<div id="quarto-search" class="" title="Search"></div>
<div class="quarto-navbar-tools">
</div>
</div> <!-- /navcollapse -->
</div> <!-- /container-fluid -->
</nav>
Expand All @@ -128,7 +130,7 @@
<!-- main -->
<div class="quarto-about-trestles">
<div class="about-entity">
<img src="images/self.jpg" class="about-image
<img src="gfx/self.jpg" class="about-image
rounded " style="width: 20em;">
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
Expand All @@ -138,11 +140,11 @@ <h1 class="title">Nic Schwab</h1>
</div>
</header>
<div class="about-links">
<a href="https://github.com/Nics-Github" class="about-link">
<a href="https://github.com/Nics-Github" class="about-link" rel="" target="">
<i class="bi bi-github"></i>
<span class="about-link-text">GitHub</span>
</a>
<a href="https://www.smith.edu/academics/faculty/nicholas-schwab" class="about-link">
<a href="https://www.smith.edu/academics/faculty/nicholas-schwab" class="about-link" rel="" target="">
<i class="bi bi-bookmark"></i>
<span class="about-link-text">Smith</span>
</a>
Expand All @@ -152,11 +154,25 @@ <h1 class="title">Nic Schwab</h1>
<p><strong>Nicholas Schwab</strong> is a visiting lecture in Statistical and Data Sciences. He is a tenured professor at Holyoke Community College. When not teaching data science, he enjoys rock climbing, running, and reading children’s books to his kids.</p>
<section id="student-hours" class="level2">
<h2 data-anchor-id="student-hours">Student Hours</h2>
<ul>
<li>Wednesdays from 12:15 pm – 1:15 pm ET in McConnell 213</li>
<li>Fridays from 12:15 pm – 1:15 pm ET in McConnell 213</li>
<li>by appointment (either in McConnell 213 or via Zoom)</li>
</ul>
<p><strong>Drop into the office:</strong> Wednesdays and Friday from 12:15 – 1:15 pm in McConnell 213</p>
<p><strong>By Appointment</strong> (schedule between 12 hours and 7 days in advance) Tuesday and Thursday 9:00 – 10:15 am</p>
Please let me know if the above times do not work for your schedule and we can coordinate another time.<br>
<!-- Google Calendar Appointment Scheduling begin --> <link href="https://calendar.google.com/calendar/scheduling-button-script.css" rel="stylesheet">
<script src="https://calendar.google.com/calendar/scheduling-button-script.js" async=""></script>
<script>
(function() {
var target = document.currentScript;
window.addEventListener('load', function() {
calendar.schedulingButton.load({
url: 'https://calendar.google.com/calendar/appointments/schedules/AcZssZ1iIHImPBba_fFowl9qbN1tFoRCcEGTpc1nzat2Hys-0tM-MPbMsMIQQwqtBxSMRV2dcFZ9KIZ2?gv=true',
color: '#039BE5',
label: 'Book an appointment',
target,
});
});
})();
</script>
<!-- end Google Calendar Appointment Scheduling -->
</section>
<section id="education" class="level2">
<h2 data-anchor-id="education">Education</h2>
Expand Down Expand Up @@ -205,9 +221,23 @@ <h2 data-anchor-id="experience">Experience</h2>
}
}
toggleBodyColorPrimary();
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', {
target: function(trigger) {
return trigger.previousElementSibling;
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) {
Expand Down Expand Up @@ -272,6 +302,92 @@ <h2 data-anchor-id="experience">Experience</h2>
return note.innerHTML;
});
}
let selectedAnnoteEl;
const selectorForAnnotation = ( cell, annotation) => {
let cellAttr = 'data-code-cell="' + cell + '"';
let lineAttr = 'data-code-annotation="' + annotation + '"';
const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
return selector;
}
const selectCodeLines = (annoteEl) => {
const doc = window.document;
const targetCell = annoteEl.getAttribute("data-target-cell");
const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
const lines = annoteSpan.getAttribute("data-code-lines").split(",");
const lineIds = lines.map((line) => {
return targetCell + "-" + line;
})
let top = null;
let height = null;
let parent = null;
if (lineIds.length > 0) {
//compute the position of the single el (top and bottom and make a div)
const el = window.document.getElementById(lineIds[0]);
top = el.offsetTop;
height = el.offsetHeight;
parent = el.parentElement.parentElement;
if (lineIds.length > 1) {
const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
const bottom = lastEl.offsetTop + lastEl.offsetHeight;
height = bottom - top;
}
if (top !== null && height !== null && parent !== null) {
// cook up a div (if necessary) and position it
let div = window.document.getElementById("code-annotation-line-highlight");
if (div === null) {
div = window.document.createElement("div");
div.setAttribute("id", "code-annotation-line-highlight");
div.style.position = 'absolute';
parent.appendChild(div);
}
div.style.top = top - 2 + "px";
div.style.height = height + 4 + "px";
let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
if (gutterDiv === null) {
gutterDiv = window.document.createElement("div");
gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
gutterDiv.style.position = 'absolute';
const codeCell = window.document.getElementById(targetCell);
const gutter = codeCell.querySelector('.code-annotation-gutter');
gutter.appendChild(gutterDiv);
}
gutterDiv.style.top = top - 2 + "px";
gutterDiv.style.height = height + 4 + "px";
}
selectedAnnoteEl = annoteEl;
}
};
const unselectCodeLines = () => {
const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
elementsIds.forEach((elId) => {
const div = window.document.getElementById(elId);
if (div) {
div.remove();
}
});
selectedAnnoteEl = undefined;
};
// Attach click handler to the DT
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
for (const annoteDlNode of annoteDls) {
annoteDlNode.addEventListener('click', (event) => {
const clickedEl = event.target;
if (clickedEl !== selectedAnnoteEl) {
unselectCodeLines();
const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
if (activeEl) {
activeEl.classList.remove('code-annotation-active');
}
selectCodeLines(clickedEl);
clickedEl.classList.add('code-annotation-active');
} else {
// Unselect the line
unselectCodeLines();
clickedEl.classList.remove('code-annotation-active');
}
});
}
const findCites = (el) => {
const parentEl = el.parentElement;
if (parentEl) {
Expand Down Expand Up @@ -314,6 +430,12 @@ <h2 data-anchor-id="experience">Experience</h2>
</div> <!-- /content -->
<footer class="footer">
<div class="nav-footer">
<div class="nav-footer-left">
&nbsp;
</div>
<div class="nav-footer-center">
&nbsp;
</div>
<div class="nav-footer-right">
<ul class="footer-items list-unstyled">
<li class="nav-item">
Expand Down
Loading

0 comments on commit 32d7946

Please sign in to comment.