5.1 - Intro to R and R Markdown
Tuesday, February 11
You’ll need to either install R and R Studio on your computer, or sign up for a free rstudio.cloud account to do the homework for this week. They’re the same thing – one works in the cloud, the other on your computer. See the Introduction to R and R Studio for instructions on what it takes.
If you are at all uncomfortable with installing software or if you want to use the lab computers, I strongly suggest you use the RStudio Cloud option. Depending on how many people choose this option, I may ask everyone to use it so I can assign projects within that framework.
In class
- An introduction to R - we’ll go through getting used to the screen and all of the elements of it together.
- An introduction to R projects and R Markdown as a way to hold all of your work on a project, negating much of the need for a detailed data diary.
- Lab: Create your own R Markdown document
Due this week
- Write out an algorithm for something you do all the time. This isn’t programmed in a language – just write down all the steps. Include a few decision points, such as the “check ingredients” in our example from last week. It can be as simple as making coffee or brushing your teeth. (Due Sunday, Feb. 9)
- Take the swirl() lesson under Exercises in the reading). You don’t have to turn anything in.
Preparation
Skills
- A gentle introduction to programming and coding. This just reviews what we were doing in class on Thursday. You might not need it.
- First two chapters of the R Study Guide: “An R and R Studio Tour” and “R Markdown”
Reading
- Todd Wallack from the Boston Globe on using a little programming to get to a story on liquor licensing. Be sure to read the story to understand how the data fits in with the story. (2018)
Just wanted to say a few words about how data journalism can help reporters flesh out a story.
— Todd Wallack (@TWallack) November 16, 2017
- Five-Thirty-Eight: Russian troll analysis on Twitter. Note the references to the original data, how it was collected, and the name of the project at Clemson. Even if you don’t care about Russian trolls, it’s worth noting these kinds of resources for the future – these are the kinds of hints that will lead you to data for your own work.