library(tidyverse)
<- read_rds("https://euclid.nmu.edu/~joshthom/teaching/dat309/week2/ATUS2/ATUS_data.RDS") atus_data
Mini-Project 1
(now) Due: September 23
In your first project you are to use tools learned this far to explore a real dataset.
Datasets
Use one of these datasets below:
- American Time Use Survey
- Panel Study of Income Dynamics
Required Components
- Use one of the datasets above.
- Submit a .html file rendered via Quarto / Rmarkdown.
- Present your project to class: 3-5 minutes (max!)
- Use
ggplot()
with good labels & legendsfilter()
select()
facet_wrap()
orfacet_grid()
rename()
group_by()
&summarize()
- Include the following plots
- barplot
- boxplot
- scatterplot
- Include a brief summary and conclusion.
- Include a brief discussion each of your plots. Two-three sentences should suffice.
Tips
- Create an R-script to do your exploratory work.
- Comment well.
- After you have some good plots and/or statistics, copy your work into the .qmd file.
- Remember, your
markdown
environment is different than your console, so you will have to load the data/tidyverse again.
- This page sheds light on the haven package we’re using with the ATUS data. Two tools that might be useful:
library(tidyverse)
library(janitor)
<- read_rds("https://euclid.nmu.edu/~joshthom/teaching/dat309/week2/ATUS2/ATUS_data.RDS") |> clean_names()
df
# make the hvn+lbl a factor
<- df |> mutate(sex = haven::as_factor(sex))
new_atus # use the number part of the hvn+lbl variable
<- new_atus |> mutate(sex = haven::zap_labels(sex)) new_atus
library(tidyverse)
<- read_rds("https://euclid.nmu.edu/~joshthom/teaching/dat309/week2/ATUS2/ATUS_data.RDS")
atus_data # filter(data, )