Create a spreadsheet
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.
Step 1: Make a spreadsheet and save it
Layout a spreadsheet for data collection using a spreadsheet-based software (Google Sheets or MS Excel).
You are taking 20 samples of 1 liter faecal sludge from pit latrines and septic tanks at households and public toilets (5 samples each). For each sample, you note the number of daily users of the sanitation system.
Your sample collection starts on 1st November 2022. On day 5, you analyse the data in the laboratory for totals solids (TS) in g/L. In your spreadsheet, note the exact date of each collected sample.
This is your data collection plan:
- Day 1: 5 samples at households using pit latrines
- Day 2: 5 samples at households using septic tanks
- Day 3: 5 samples at public toilets that are pit latrines
- Day 4: 5 samples at public toilets that are septic tanks
- Day 5: Analyses of all 20 samples for total solids (TS) in g/L on a lab scale with accuracy of 0.01 g
Make up the results for the total solids (TS) analyses (e.g. 12.48 g/L).
Save the spreadsheet as XLSX with a file name of your choice.
Step 2: Create a new repository on GitHub & clone to Posit Cloud
Step 2.1: Create a new repository
- Open the GitHub Organisation for the course: https://github.com/ds4owd-002
- To right of the field “Find a repository”, click on the green New button.
- In the Repository name field write
samples-USERNAME
.- Replace
USERNAME
with your actual GitHub username. - For example, if your username is
johnsmith
, the repository will besamples-johnsmith
. - Avoid using spaces in the repository name. Use a dash
-
instead.
- Replace
- Scroll down on the same page, and click Create repository.
Step 2.2: Clone the repository to Posit Cloud
- In the Quick setup section, ensure HTTPS is selected (not SSH)
- Click on the clipboard icon next to the HTTPS URL to copy it
- 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.
Step 3: Upload the data
- In RStudio, navigate to the Files tab in the bottom right window
- Click on the Upload button
- Click Choose File and select your XLSX spreadsheet from Step 1
- Click OK to upload the file to your project
Step 4: 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: Added spreadsheet with sample data
- 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 5: 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
samples-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 besamples-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 uploaded XLSX file in your repository.
- Click on the Issues tab.
- Click on the green New issue button.
- In the Title field write: Create spreadsheet and upload to cloud.
- 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.
Congratulations! You have successfully created a spreadsheet, uploaded it to GitHub, and completed this assignment.