---
title: "Mini-Project 1"
subtitle: "Due: September 19"
toc-title: "Exploratory Data Analysis w/Ch. 1-3"
date: today
toc: true
format:
  html: 
    code-overflow: wrap
    toc: true
    toc-title: "Table of Contents"
    # hide code?

execute:
  warning: false
  message: false
---

In your first project you are to use tools learned this far to explore a real dataset.

## Datasets

Use one of these datasets below:

1.  American Time Use Survey
    i) From the U.S. Bureau of Labor Statistics
    ii) ATUS - [link](http://euclid.nmu.edu/~joshthom/Teaching/DAT309/Week3/load_ATUS_data.R)
  
2. Panel Study of Income Dynamics
    i) Based at the University of Michigan
    ii) PSID - [link](http://euclid.nmu.edu/~joshthom/Teaching/DAT309/Data/PSID2/)
  
## Required Components
1. Use one of the datasets above.
2. Submit a .html file rendered via Quarto / Rmarkdown.
3. Present your project to class: 3-5 minutes (max!)
4. Use
    (i) `ggplot()` with good labels & legends
    (ii) `filter()`
    (iii) `select()`
    (iv) `facet_wrap()` or `facet_grid()`
    (v) `rename()`
    (vi) `group_by()` & `summarize()`
5. Include the following plots
    (i) barplot
    (ii) boxplot
    (iii) scatterplot
6. Include a brief summary and conclusion.  
7. Include a brief discussion each of your plots.  Two-three sentences should suffice.

## Tips
1. Create an R-script to do your exploratory work.
2. Comment well.  
3. After you have some good plots and/or statistics, copy your work into the .qmd file.
4. Remember, your `markdown` environment is different than your console, so you will have to load the data/tidyverse again.  
5. [This page](https://haven.tidyverse.org/articles/semantics.html) sheds light on the **haven** package we're using with the ATUS data.  Two tools that might be useful:

```{r}
library(tidyverse)
library(haven)

source("~/Google Drive/Teaching/DAT309/Week3/load_ATUS_data.R")
# make the hvn+lbl a factor
df |> select(sex) |> as_factor()
# use the number part of the hvn+lbl variable
df |> select(sex) |> zap_labels()
```


