7.1 Merging in R
Tuesday, February 25
In class
- Joining in R
- Calculating new information from old in R
If there’s time, I’ll introduce you to your dataset choices for the memo project, and we’ll go over some details on importing data that doesn’t behave well. If not, we’ll do that next week.
Thursday, Feb. 27: Guest speaker, Pamela Ren Larsen of The Arizona Republic. Be sure to do the reading of her work below so you can ask good questions. We’ll also spend some time reviewing what we’ve done so far. She’ll join the morning class at 9 and the afternoon class at 4.
Due this week
Lab from last week on the Murder Accountability Project filtering and grouping. You can work together on it, but everyone should upload your own version’s knitted document.
Preparation
Skills
- Review the work we did last week in class, and prepare questions. You should practice on any of the datasets we’ve used in class so far, trying to come up with your own questions. You don’t need to turn anything in, but I’ll be asking for your examples in class.
- Review the R study guide chapter on “mutate” . After this, there’s only one more verb!
For Thursday
Reading
- “Where will the next deadly fire strike?” by Dennis Wagner and Pamela Ren Larson, Arizona Republic, July 28, 2019.
- “Digging into the Purple Vote”, by Yvonne Wingett Sanchez and Pamela Ren Larson, Arizona Republic, Nov. 14, 2018
Skills
Try going through the chapter on Combining data
using joins in our study guide. This is the last major verb you have to learn!
Going further
- For
group by
, try usingtabyl
instead of summarise and pivot to create crosstabs. - For
mutate
, try working with dates as shown in the tutorial, and also try to make more complicated categories and cacluations.