---
title: "Project 1"
subtitle: "Due: September 28"
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) Intro - [link](http://euclid.nmu.edu/~joshthom/dat309/week3/atus-intro.html)
    iii) Sample Exercises - [link](atus-exercises.qmd)

2. IPUMS
    i) IPUMS ("Integrated Public Use Microdata Series") is a [website and database](https://usa.ipums.org/usa/about.shtml) providing access to over sixty integrated, high-precision samples of the American population drawn from sixteen federal censuses, from the American Community Surveys of 2000-present.  
    
    These samples collectively constitute our richest source of quantitative information on long-term changes in the American population.     
    
    ii) Starter Code - [link](ipums-project.qmd) 


## Tips
1. First 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 a .qmd file.
4. Remember, your `markdown` environment is different than your console, so you will have to load the data/tidyverse again.  


# Project Structure & Requirements

Your rendered report must follow this standard outline:

1. **Introduction & Motivation:** State your research question clearly. Explain why this question is interesting or practically relevant.
2. **Data Preparation & Sample Definition:**
   * Document all filtering decisions (e.g., restricting age to prime working years $25 \le \text{AGE} \le 64$; omitting non-earners or top-coded records).
   * Present a clear "Data Cleaning Pipeline" detailing how missing codes were converted and how categorical levels were collapsed.
3. **Exploratory Data Analysis (EDA):**
   * Produce at least **three** `ggplot2` figures and **one** summary statistics table.
   * Every figure must feature descriptive labels, clean axis scales, and an informative caption. Discuss the distribution, skewness, and visible patterns in text, phrased as findings about *this sample* (not the U.S. population).
4. **Discussion, Limitations & Conclusion:**
   * Summarize the primary descriptive takeaway from your sample.
   * Explicitly note that these results are unweighted and therefore should **not** be generalized to the U.S. population — restate briefly why (see the caveat section above) and what would be needed to make a population-level claim (i.e., incorporating `PERWT` via a survey design).
   * Address at least one additional limitation of this analysis (e.g., missing data, top-coding, self-selection into categories like remote work).
5. Present your project to class: 3-5 minutes (max!)
6. Use
    (i) `ggplot()` with good labels & legends
    (ii) `filter()`
    (iii) `select()`
    (iv) `facet_wrap()` or `facet_grid()`
    (v) `rename()`
    (vi) `group_by()` & `summarize()`
7. Include the following plots
    (i) barplot
    (ii) boxplot
    (iii) scatterplot
8. Include a brief summary and conclusion.  
9. Include a brief discussion each of your plots.  Two-three sentences should suffice.


## Grading Rubric (100 Points Total)

| Category | Points | Exemplary (Full Marks) | Developing (Partial Marks) | Needs Revision (Low Marks) |
|:---|:---:|:---|:---|:---|
| **Research Question & Framing** | **15** | Question is well-scoped, clearly stated, and motivated in the introduction. | Question is stated but overly broad, vague, or lacks context. | No clear research question formulated. |
| **Data Cleaning & Recoding** | **20** | IPUMS missing value codes (`9999999`, `0`) are cleanly addressed; factor variables (e.g., `DEGFIELD`) are appropriately collapsed; sample restrictions are explicitly justified; code runs without warnings. | Some special codes ignored or misclassified; sample restrictions are arbitrary or poorly documented. | Data used raw without handling missing value codes, yielding corrupted statistics or nonsensical values. |
| **Exploratory Visualizations & Tables** | **25** | Visualizations use effective geometries, clear labels, and direct captions. Text critically evaluates what the plots reveal about the sample. | Visualizations are present but lack polished formatting (raw variable names on axes, unreadable text, inappropriate plot choices). | Visualizations are missing, unreadable, or not discussed in the narrative. |
| **Summary Statistics & Interpretation** | **20** | Summary statistics (means, medians, proportions, group comparisons) are computed correctly and interpreted clearly and correctly in plain language. | Statistics are computed but interpretation is vague, uses incorrect units, or overstates what the numbers show. | Statistics are missing, incorrect, or presented without any interpretation. |
| **Critical Discussion & Limitations** | **10** | Clearly explains that results are unweighted/sample-specific and do not generalize; reflects thoughtfully on at least one other limitation. | Mentions the unweighted caveat only briefly or in boilerplate fashion; limited reflection on other limitations. | Omits the unweighted caveat, or makes sweeping population-level claims from unweighted sample statistics. |
| **Code Quality & Reproducibility** | **10** | Quarto file renders cleanly from scratch; code follows tidy style guidelines with clear comments; packages loaded upfront; no hardcoded absolute paths. | Renders with warnings or minor formatting bugs; code is cluttered, poorly commented, or uses redundant operations. | Fails to compile or knit; relies on hardcoded local directory paths that prevent independent reproduction. |
