In a recent semester, we had a big problem with honesty on the computing assignments. My least favorite part of my job is sanctioning students who cheat. It’s a lot of work, uncomfortable, and unrewarding. That said, it is my job. Please make sure to complete the assignment honestly.
This document details the standards. Please read it carefully before you begin.
Start a new project in RStudio Cloud.
Install the package tidyverse.
Upload the .rds
version of the health
data
set from the data page. This data set
contains measures of approval for the ACA and measure of health at the
state level from about 2013.
Start a new R script. Save the script as analysis.R
.
In the script, do the following (include comments!):
health.rds
.percent_uninsured
) along the
x-axis.percent_favorable_aca
) along the y-axis.geom_point()
use
geom_label()
where the states’ two-letter code
(state_abbr
) corresponds to the label
aesthetic. Hint: You’ll need to add label = state_abbr
to
your aes()
.life_expectancy
)
corresponds to the color
aesthetic.Once you are satisfied with your code and observations, click the
tiny notebook icon (to the left of the Run button). When
prompted, select PDF (PDF tends to work better, in my
experience) or MS Word. You may be prompted to download the
document–do it! If not, then select the Files tab in the
lower-right, check the box for the document you want to download (it
should be analysis.docx
or analysis.pdf
), and
click More > Export…, and follow the instructions Submit
this docx
or .pdf
file to Canvas. Do not
submit the .R
script itself.
Examples:
The follow shows the basic format of the R code and shows what the output should look like after you compile it into a notebook.