Annotated-Lab 1 Spring 2025 Assignment - RMD
Annotated-Lab 1 Spring 2025 Assignment - RMD
```{r}
knitr::opts_chunk$set(echo = FALSE)
knitr::opts_chunk$set(eval = TRUE)
knitr::opts_chunk$set(include = FALSE)
```
```{r}
library(tidyverse)
library(haven)
library(kableExtra)
library(lubridate)
```
```{r}
girls_participation <- read.csv("~/downloads/girls_participation")
```
```{r}
cps_2018 <- read_dta("~/downloads/cepr_org_2018.dta")
```
```{r}
cps_2019 <- read_dta("~/downloads/cepr_org_2019.dta")
```
```{r}
covid_data <- read.csv("~/downloads/United_States_COVID-
19_Cases_and_Deaths_by_State_over_Time_-_ARCHIVED.csv")
```
Create an R Markdown file that completes each of the listed tasks, **Submit both
the markdown file and the output on Carmen**. Submit the markdown file first so
that you can see the output document when you look at most recent submission.
Each question will be worth 10 points and 10 points will be awarded for getting the
entire document to knit. If you have a code chunk that you cannot get to run, then
you can mark the code as echo=TRUE and eval=FALSE. This should show the code, but
not run it.
## 1. Report a list of variable names for the Covid data from the class 1
exercises.
## 3. What is the average number of weekly new cases in Ohio according to the CDC
Covid data?
## 4. Use the CPS data to find the average wage4 by race (wbhaom). You will need to
add the remove missing option to your commands. For example
## 5 Do all states have the same number of observations in the Covid data?
## 7. The Tidyverse lab starts with the code necessary to creat a bar graph of
football participation in 2010. Use that code as a template to make a graph of
volleyball participation for girls in 2015 in the 5 states that have the most
participants.
```{r}
pres <- read.csv("~/downloads/polls/president_polls.csv")
```
## 9. Find a package at
<https://cran.r-project.org/web/packages/available_packages_by_name.html> that
contains some data or code to scrape data from another source. Open some data and
create a summary of at least 1 variable. (There are packages that can retrieve
census data, world bank data, Covid data, sports data, and if you want to be boring
you can even use the wooldridge data.)
```{r}
library(quantmod)
getSymbols('^GSPC')
```