Data visualisation with ggplot2
A pre-requisite for this homework is that you worked through the “Interaction with GitHub” assignment of module 1. You will need your GitHub Personal Access Token to push your committed changes back to GitHub.
As we progress through the course, we’re gradually reducing the level of instructional detail. This assignment follows the same steps as module 1, but without screenshots. If you need visual guidance, refer back to the module 1 assignments.
Step 1: Clone your module 2 assignments repository
- Open https://github.com/ in your browser.
- Navigate to the GitHub organization for the course: https://github.com/ds4owd-002
- Find the repository
md-02-assignments-USERNAME
that ends with your GitHub username, and open it by clicking on the repository name.- Replace
USERNAME
with your actual GitHub username. - For example, if your username is
johnsmith
, the repository will bemd-02-assignments-johnsmith
.
- Replace
- Click on the green Code button.
- Copy the HTTPS URL to your clipboard by clicking on the clipboard icon next to the URL.
- Open the Content tab of the ds4owd-002 workspace on Posit Cloud: https://posit.cloud/spaces/663318/content/all?sort=name_asc
- Click the blue button New Project > New Project from Git Repository
- Paste the HTTPS URL from GitHub into the URL of your Git Repository field and click OK. Leave the checkbox under Packages checked.
- Wait until the project is deployed. This may take a few minutes, depending on your internet connection.
- Open
md-02a-boxplot.qmd
and follow the instructions to work through the tasks.
Step 2: Commit and push your changes
- Navigate to the Git pane in the top-right window of RStudio
- Check the box next to all files to stage them for a commit
- Click on the Commit button. A new window opens.
- Enter a commit message in the Commit message field in the top right corner. For example: completed data visualization tasks
- Click on the Commit button
- If you see a message that confirms your commit, click on Close. If you do not see this message, make sure you have staged the files (checked the box next to them) for commit and entered a commit message.
- Click on the Push button in the top right corner.
- Enter your GitHub username and click OK
- Enter your GitHub Personal Access Token (PAT) in the field and click OK. This is the personal access token you created in Module 1.
If you see a message that says HEAD -> main
, then you have successfully pushed your changes to the remote repository on GitHub. Click Close. If you do not see this message, make sure you have entered your GitHub username and GitHub PAT correctly.
If you have stored your PAT in a Word file, a blank space might have been copied along with the PAT. We recommend using a TXT file (Notepad on Windows or TextEdit on Mac) or a password manager to store your PAT securely.
You need to enter the GitHub Personal Access Token (PAT) you created in Module 1 to push your changes back to GitHub.
Step 3: Open an issue on GitHub
- Open https://github.com/ in your browser.
- Navigate to the GitHub organization for the course: https://github.com/ds4owd-002
- Find the repository
md-02-assignments-USERNAME
that ends with your GitHub username, and open it by clicking on the repository name.- Replace
USERNAME
with your actual GitHub username. - For example, if your username is
johnsmith
, the repository will bemd-02-assignments-johnsmith
.
- Replace
You can search for your repository by typing your username in the search bar just below the Repository heading.
- You can verify here that your changes have been pushed to the remote repository by looking at the text next to the
md-02a-boxplot.qmd
file. It should display the commit message you entered in the previous step. - Click on the Issues tab.
- Click on the green New issue button.
- In the Title field write: Completed module 2 assignment.
- In the Leave a comment field, tag the course instructors
@seawaR
@massarin
@larnsce
and add a question about this module. We would like to see one question from every participant. - Scroll down the page a bit and click the green Create button.
This module has two assignment files that need to be completed: 1. md-02a-boxplot.qmd
2. md-02b-visualize.qmd
If you have only completed md-02a-boxplot.qmd
, please return to Posit Cloud and complete md-02b-visualize.qmd
as well. You should create two separate issues on GitHub - one for each completed assignment file.
Congratulations! You have completed the data visualization assignment and are now ready for the next module.