Skip to content

Commit

Permalink
Finally finish updating the mcq omfg
Browse files Browse the repository at this point in the history
  • Loading branch information
RohanAlexander committed Oct 14, 2024
1 parent ac10003 commit 497da92
Show file tree
Hide file tree
Showing 40 changed files with 874 additions and 2,772 deletions.
2 changes: 1 addition & 1 deletion 06-farm.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
engine: knitr
---

# Farm data {#sec-farm-data}
# Measurement, censuses, and sampling {#sec-farm-data}

::: {.callout-note}
Chapman and Hall/CRC published this book in July 2023. You can purchase that [here](https://www.routledge.com/Telling-Stories-with-Data-With-Applications-in-R/Alexander/p/book/9781032134772). This online version has some updates to what was printed.
Expand Down
4 changes: 2 additions & 2 deletions 07-gather.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
engine: knitr
---

# Gather data {#sec-gather-data}
# APIs, scraping, and parsing {#sec-gather-data}

::: {.callout-note}
Chapman and Hall/CRC published this book in July 2023. You can purchase that [here](https://www.routledge.com/Telling-Stories-with-Data-With-Applications-in-R/Alexander/p/book/9781032134772). This online version has some updates to what was printed.
Expand Down Expand Up @@ -1496,7 +1496,7 @@ In general the result is not too bad. OCR is a useful tool but is not perfect an

1. *(Plan)* Consider the following scenario: *A group of five undergraduates---Matt, Ash, Jacki, Rol, and Mike---each read some number of pages from a book each day for 100 days. Two of the undergraduates are a couple and so their number of pages is positively correlated, however all the others are independent.* Please sketch what a dataset could look like, and then sketch a graph that you could build to show all observations.
2. *(Simulate)* Please further consider the scenario described and simulate the situation (note the relationship between some variables). Then write five tests based on the simulated data.
3. *(Acquire)* Please obtain some actual data about snowfall and add a script updating the simulated tests to these actual data.
3. *(Acquire)* Please obtain some actual data, similar to the scenario, and add a script updating the simulated tests to these actual data.
4. *(Explore)* Build a graph and table using the real data.
5. *(Communicate)* Please write some text to accompany the graph and table. Separate the code appropriately into `R` files and a Quarto doc. Submit a link to a high-quality GitHub repo.

Expand Down
268 changes: 134 additions & 134 deletions 08-hunt.qmd

Large diffs are not rendered by default.

1,913 changes: 0 additions & 1,913 deletions 09-clean_and_prepare.rmarkdown

This file was deleted.

6 changes: 3 additions & 3 deletions docs/00-errata.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,19 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./06-farm.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./07-gather.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-hunt.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Hunt data</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Experiments and surveys</span></span></a>
</div>
</li>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions docs/01-introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,19 +233,19 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./06-farm.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./07-gather.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-hunt.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Hunt data</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Experiments and surveys</span></span></a>
</div>
</li>
</ul>
Expand Down
30 changes: 15 additions & 15 deletions docs/02-drinking_from_a_fire_hose.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./06-farm.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./07-gather.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-hunt.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Hunt data</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Experiments and surveys</span></span></a>
</div>
</li>
</ul>
Expand Down Expand Up @@ -834,18 +834,18 @@ <h3 data-number="2.2.2" class="anchored" data-anchor-id="simulate"><span class="
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a>simulated_data</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 151 × 2
Division Party
&lt;int&gt; &lt;chr&gt;
1 1 Labor
2 2 Green
3 3 Liberal
4 4 Other
5 5 Other
6 6 Liberal
7 7 Other
8 8 Green
9 9 Green
10 10 Green
Division Party
&lt;int&gt; &lt;chr&gt;
1 1 Labor
2 2 Liberal
3 3 Green
4 4 National
5 5 Other
6 6 Labor
7 7 Other
8 8 Liberal
9 9 Green
10 10 National
# ℹ 141 more rows</code></pre>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions docs/03-workflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./06-farm.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./07-gather.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-hunt.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Hunt data</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Experiments and surveys</span></span></a>
</div>
</li>
</ul>
Expand Down Expand Up @@ -1531,7 +1531,7 @@ <h3 data-number="3.6.5" class="anchored" data-anchor-id="parallel-processing"><s
</div>
<div class="sourceCode cell-code" id="cb35"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="fu">toc</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>First bit of code: 0.001 sec elapsed</code></pre>
<pre><code>First bit of code: 0 sec elapsed</code></pre>
</div>
<div class="sourceCode cell-code" id="cb37"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="fu">tic</span>(<span class="st">"Second bit of code"</span>)</span>
<span id="cb37-2"><a href="#cb37-2" aria-hidden="true" tabindex="-1"></a><span class="fu">Sys.sleep</span>(<span class="dv">3</span>)</span>
Expand All @@ -1541,7 +1541,7 @@ <h3 data-number="3.6.5" class="anchored" data-anchor-id="parallel-processing"><s
</div>
<div class="sourceCode cell-code" id="cb39"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="fu">toc</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Second bit of code: 3.007 sec elapsed</code></pre>
<pre><code>Second bit of code: 3.008 sec elapsed</code></pre>
</div>
</div>
<p>And so we know that there is something slowing down the code. (In this artificial case it is <code>Sys.sleep()</code> causing a delay of three seconds.)</p>
Expand Down
6 changes: 3 additions & 3 deletions docs/04-writing_research.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./06-farm.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./07-gather.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-hunt.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Hunt data</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Experiments and surveys</span></span></a>
</div>
</li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions docs/05-static_communication.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./06-farm.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./07-gather.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-hunt.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Hunt data</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Experiments and surveys</span></span></a>
</div>
</li>
</ul>
Expand Down Expand Up @@ -4857,8 +4857,8 @@ <h3 class="unnumbered anchored" data-anchor-id="paper">Paper</h3>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./06-farm.html" class="pagination-link" aria-label="Farm data">
<span class="nav-page-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span> <i class="bi bi-arrow-right-short"></i>
<a href="./06-farm.html" class="pagination-link" aria-label="Measurement, censuses, and sampling">
<span class="nav-page-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>
Expand Down
18 changes: 9 additions & 9 deletions docs/06-farm.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>Telling Stories with Data - 6&nbsp; Farm data</title>
<title>Telling Stories with Data - 6&nbsp; Measurement, censuses, and sampling</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -163,7 +163,7 @@
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./06-farm.html">Acquisition</a></li><li class="breadcrumb-item"><a href="./06-farm.html"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></a></li></ol></nav>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./06-farm.html">Acquisition</a></li><li class="breadcrumb-item"><a href="./06-farm.html"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></a></li></ol></nav>
<a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
<button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
Expand Down Expand Up @@ -267,19 +267,19 @@
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./06-farm.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./07-gather.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-hunt.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Hunt data</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Experiments and surveys</span></span></a>
</div>
</li>
</ul>
Expand Down Expand Up @@ -500,9 +500,9 @@ <h2 id="toc-title">Table of contents</h2>
<!-- main -->
<main class="content" id="quarto-document-content">

<header id="title-block-header" class="quarto-title-block default"><nav class="quarto-page-breadcrumbs quarto-title-breadcrumbs d-none d-lg-block" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./06-farm.html">Acquisition</a></li><li class="breadcrumb-item"><a href="./06-farm.html"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></a></li></ol></nav>
<header id="title-block-header" class="quarto-title-block default"><nav class="quarto-page-breadcrumbs quarto-title-breadcrumbs d-none d-lg-block" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./06-farm.html">Acquisition</a></li><li class="breadcrumb-item"><a href="./06-farm.html"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></a></li></ol></nav>
<div class="quarto-title">
<h1 class="title"><span id="sec-farm-data" class="quarto-section-identifier"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Farm data</span></span></h1>
<h1 class="title"><span id="sec-farm-data" class="quarto-section-identifier"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Measurement, censuses, and sampling</span></span></h1>
</div>


Expand Down Expand Up @@ -2668,8 +2668,8 @@ <h3 class="unnumbered anchored" data-anchor-id="activity">Activity</h3>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./07-gather.html" class="pagination-link" aria-label="Gather data">
<span class="nav-page-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Gather data</span></span> <i class="bi bi-arrow-right-short"></i>
<a href="./07-gather.html" class="pagination-link" aria-label="APIs, scraping, and parsing">
<span class="nav-page-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">APIs, scraping, and parsing</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>
Expand Down
Loading

0 comments on commit 497da92

Please sign in to comment.