Due 2/23 by the start of class.

Working in R

Start an instance of RStudio using the project file inside your learningR folder. Start a new R Markdown file

  1. Give it a title, an author, and a date (feel free to play with a table of contents or code folding as well)
  2. Keep the setup code chunk already in the new R Markdown file, but delete everything else.
  3. Create a new code chunk to read in TWO of the stepping stones variables I’ve collected (you might want to focus on two of the variables assigned to your group, but you’re welcome to use any of them) – all of the variables can be found on this github site. To get the url for the data you want to read in, click on the csv file and then click the button that says “Raw” at the top of the resulting page; this should open up a window with the comma-delimited text for that dataset – use the url for this page.
  4. Do any data preparation you believe is necessary to make a clear and beautiful graph of the seleced variables. This might involve fixing or revising the names, the years, or other elements (but it might not be necessary; I usually don’t know if it’s necessary until I start making figures and find I have to go back and do some more data prep).
  5. Create a figure for each of your selected measures. Make sure these contain good titles or subtitles or captions, choose your axis titles with intention, adjust scales and breaks and scale labels as needed, select colors and themes purposefully, add annotations or other figure components that you think make the figure clearer. In short, practice using the ggplot functions we’ve talked about in the last two weeks.
  6. Put each of these figures in their own section within the markdown file and add some text either above or below each figure providing some interpretation of what you see.
  7. When you’re done, knit the R markdown file to produce an .html file.

Submit both the .Rmd file and the resulting .html file to me via direct message on slack.

Working in Teams: Stepping Stones progress

For the coming week, teams should:

  1. Start an R markdown file that
    1. reads in the data you’ve (or I’ve) prepared in the data preparation scripts and saved into csv files in the data folder (this includes the initial pre-collected variables, variables 1-3 assigned to your team, and variable 4 for which I’m sending scripts and csv files);
    2. visualizes each measure;
    3. narrates all of the measures you’re working with so far. You should start with the visualizations you submitted last week (but look for feedback from me) and the narrative descriptions you’ve been working on. For this week, draft/revise and include a brief description to accompany each variable, including variable 5, even though you probably can’t include any visualization of this yet;
    4. makes note of any policy changes or events that should be noted on the figures to help provide more context;
  2. Revise the scripts to download and prepare variables 1, 2, and 3, if needed (you’ll hear more from me).
  3. For the final variable (V5) in your set, submit the data request through the channels we’ve identified (Teams 1 and 5) or gather the data via a more manual process (Teams 2, 3, 4) outlined in the stepping stones teams document. Make it a csv file, structured like the csv files current on github, and share it on slack.

This work should be submitted to the stepping stones channel in slack so we can better learn from one another.