Homework Instructions ⭐

Introduction

Homework is individual; the in-class pair programming approach will not apply. Students should work alone but are encouraged to share ideas with peers and seek help from preceptors and the instructor. Most homework assignments have TidyTuesday and non-TidyTuesday sections; follow the specific instructions for each as described below.

Procedure for TidyTuesday Section

If the homework contains a TidyTuesday section, mainly follow the ICA Instructions except that the TT Template file linked at the bottom of the Table of Content of the homework assignment page should be moved to src\tt folder. After carrying out the rest of outlined instructions, open the class communication tool (What? See Preparing for Class Instructions (GDoc)) and share in the week’s TidyTuesday thread (i) the best visual of what you have created and (ii) a direct link to the TidyTuesday story you have published on your portfolio website.

Procedure for Non-TidyTuesday Section

If the homework contains a non-TidyTuesday section, follow the steps below to work on and submit your work:

1️⃣ Clone Repository

Do this step only once.

Clone your homework repository into your computer by following the steps below.

  1. (to open in a new window) the GitHub Classroom Assignment invite link: https://classroom.github.com/a/evvsOXvz
  2. If the Join the classroom screen appears, select your name from the list. If your name is not listed, let the instructor know.
  3. Click Accept this assignment
  4. Wait few second for GitHub Classroom to create your repository copy
  5. Refresh the webpage and a link should appear, if not, wait few more seconds and try again.
  6. Click the shown link to browse to the generated repository
  7. Click the Code button –> Open with GitHub Desktop
  8. Select an appropriate Local path on your machine (avoid paths that sync with the cloud, eg, paths inside Apple iCloud or Google Drive folders) –> click Clone
  9. Select For my own purposes option –> click Continue
  10. From the Repository menu –> select Show in Explorer/Finder
  11. From the opened menu, double-click the file ending in Rproj

2️⃣ Open as Project

Your homework repository should be opened in RStudio as a project. How? Check the upper-right corner of RStudio, if your homework repository name is shown there, your are good to go. Otherwise, open GitHub Desktop –> from dropdown menu located on the top-left corner, select your homework repository if not selected –> Repository menu –> select Show in Explorer/Finder → double-click the file ending in Rproj

3️⃣ Add Files to Repository

Only if the homework assignment does not have specific instructions, follow the steps below to add the homework assignment file to your homework:

  • Download the homework template file linked at the bottom of the Table of Content of the homework assignment page
  • Move the file to the homework’s src folder (Open RStudio –> File pane –> click the gear icon –> select Show Folder in New Window –> move the file to the correct location)
  • Open the _quarto.yml file (Open RStudio –> File pane –> click the R icon in the top-right corner –> open the file)
  • Add the name of homework template file to the _quarto.yml file under the chapters section–notice how the sample files are listed. This step ensures that the assignment appears in your homework website when rendered.

4️⃣ Solve, Commit, Push

Open the homework template file and work on the exercises. After finishing a coherent part, it is recommended to back it up to GitHub. To do so, open GitHub Desktop –> make sure your homework repository is currently selected (How? The name of your homework show appear on the top-left corner of GitHub Desktop) –> select the files that you would like to commit –> in the message textbox, write a meaningful message starting with a present tense verb, eg, Complete exercise 1 –> click the commit button –> click the push button. When done and ready for grading, commit your last edits with a message that say something like HW1 ready for grading then push it.

5️⃣ Publish Website

Pushing your code to GitHub will not automatically update your (private) homework website. Before re-publishing your (private) homework website, it is a good idea to preview it locally. To do so, open the Build pane –> click Render Book and wait for your homework website to show. Inspect the generated website and if satisfied, follows these steps: open RStudio –> open Terminal pane (if the terminal is hidden, click Tools –> Terminal –> New Terminal) –> type quarto publish gh-pages --no-browser –> a message will appear, type Yes (or simply hit Enter) to confirm. If the File Deleted dialog pops up, click Yes. Wait till the operation finished. A URL to your privately published homework website will appear if the publishing was successful. clicking the generated URL will take you to a 404 error page because your homework website was privately published.