2 Review
🚩 Pre-Class Learnings
To prepare for this lesson, do the followings:
- Read File Organization Appendix
- Read Git & GitHub Appendix
- Read Keyboard Shortcut Appendix
- Open your portfolio GitHub repository and note how the files are organized
🔥 Data Story Critique
Go to https://rhythm-of-food.net/#explore-foods then answer the following questions:
- What is the data story?
- What is effective?
- What could be improved?
ImportantICA Instructions
Before starting, review the ICA Instructions ⭐ for details on pair programming and activity procedures.
🧩 Learning Goals
By the end of this lesson, you should be able to:
- Navigate the file system of your portfolio and homework repositories
- Explain the difference between absolute and relative file paths and why relative file paths are preferred when referencing files
- Construct relative file paths to read in data
- Review data wrangling from COMP/STAT 112
- Use the
git
verbs (via Github.com and Github Desktop):clone
,add
,commit
,push
, andpull
to interact with your repositories - Practice using keyboard shortcuts
Exercise
Download the code and data files linked in the Code Links area at the end of the table of contents of the page. Move the code file to src\ica
folder in your portfolio repository and the data file to data\raw
folder. Open the code file and follow the instructions.
Solutions
- Load packages and read in data.
Solution
- Clean the
PrecipYr
by replacing 99999 withNA
.
- Add
dateInYear
variable.
Solution
- Add in 3-letter month abbreviations.
Solution
- Write out clean data to a CSV file.