Skip to content

Commit

Permalink
Remove JHUR ref
Browse files Browse the repository at this point in the history
  • Loading branch information
avahoffman committed Jul 16, 2024
1 parent 791aa9e commit b4635bf
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 31 deletions.
13 changes: 7 additions & 6 deletions modules/Factors/lab/Factors_Lab.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ editor_options:
chunk_output_type: console
---

Load all the libraries we will use in this lab.
Load all the packages we will use in this lab.

```{r message=FALSE}
library(dplyr)
library(ggplot2)
library(tidyverse)
```

### 1.0

Load the Youth Tobacco Survey data (using the `jhur` library function `read_yts()`). `select` "Sample_Size", "Education", and "LocationAbbr". Name this data "yts".

```{r 1.0response}
Load the Youth Tobacco Survey data and `select` "Sample_Size", "Education", and "LocationAbbr". Name this data "yts".

```{r}
yts <-
read_csv("https://daseh.org/data/Youth_Tobacco_Survey_YTS_Data.csv") %>%
select(Sample_Size, Education, LocationAbbr)
```

### 1.1
Expand Down
19 changes: 14 additions & 5 deletions modules/Factors/lab/Factors_Lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,24 @@ <h1 class="title toc-ignore">Factors Lab</h1>
</div>


<p>Load all the libraries we will use in this lab.</p>
<pre class="r"><code>library(dplyr)
library(ggplot2)</code></pre>
<p>Load all the packages we will use in this lab.</p>
<pre class="r"><code>library(tidyverse)</code></pre>
<div id="section" class="section level3">
<h3>1.0</h3>
<p>Load the Youth Tobacco Survey data (using the <code>jhur</code>
library function <code>read_yts()</code>). <code>select</code>
<p>Load the Youth Tobacco Survey data and <code>select</code>
“Sample_Size”, “Education”, and “LocationAbbr”. Name this data
“yts”.</p>
<pre class="r"><code>yts &lt;-
read_csv(&quot;https://daseh.org/data/Youth_Tobacco_Survey_YTS_Data.csv&quot;) %&gt;%
select(Sample_Size, Education, LocationAbbr)</code></pre>
<pre><code>## Rows: 9794 Columns: 31
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: &quot;,&quot;
## chr (24): LocationAbbr, LocationDesc, TopicType, TopicDesc, MeasureDesc, Dat...
## dbl (7): YEAR, Data_Value, Data_Value_Std_Err, Low_Confidence_Limit, High_C...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.</code></pre>
</div>
<div id="section-1" class="section level3">
<h3>1.1</h3>
Expand Down
16 changes: 7 additions & 9 deletions modules/Factors/lab/Factors_Lab_Key.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@ editor_options:
chunk_output_type: console
---

Load all the libraries we will use in this lab.
Load all the packages we will use in this lab.

```{r message=FALSE}
library(dplyr)
library(ggplot2)
library(tidyverse)
```

### 1.0

Load the Youth Tobacco Survey data (using the `jhur` library function `read_yts()`). `select` "Sample_Size", "Education", and "LocationAbbr". Name this data "yts".
Load the Youth Tobacco Survey data and `select` "Sample_Size", "Education", and "LocationAbbr". Name this data "yts".

```{r 1.0response}
library(jhur)
yts <- read_yts() %>% select(Sample_Size, Education, LocationAbbr)
# Alt:
# yts <- read_csv("https://daseh.org/data/Youth_Tobacco_Survey_YTS_Data.csv")
```{r}
yts <-
read_csv("https://daseh.org/data/Youth_Tobacco_Survey_YTS_Data.csv") %>%
select(Sample_Size, Education, LocationAbbr)
```

### 1.1
Expand Down
Loading

0 comments on commit b4635bf

Please sign in to comment.