Macquarie University

22 Feb 2019

9:00 am - 4:30 pm

Instructors: Peter Humburg, Tim Keighley

Helpers: Kate Dodds, James Lawson, Richard Miller

General Information

This worksop is based on the R Data Carpentry workshop for social scientists. It employs Data Carpentry teaching methods and material. The workshop is intended as a follow-up to a regular R Data or Software Carpentry providing a more detailed introduction to ggplot and how to use it effectively. Its target audience is researchers who have attended a Carpentries R workshop befor or have some practical experience with using R. Participants will be encouraged to help one another and to apply what they have learned to their own research problems.

For more information on what The Carpentries we teach and why, please see the paper "Good Enough Practices for Scientific Computing".

Who: The course is aimed at graduate students and other researchers. You should have some experience using R.

Where: Room 163, 14 Sir Christopher Ondaatje Avenue, Macquarie University. Get directions with OpenStreetMap or Google Maps.

When: 22 Feb 2019. Add to your Google Calendar.

Requirements: This workshop is targeted at previous participants of Data or Software Carpentry R courses and participants are expected to have basic familiarity with R. Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below). They should also have a GitHub account. Participants are required to abide by Data Carpentry's Code of Conduct.

Accessibility: We are committed to making this workshop accessible to everybody. The workshop organizers have checked that:

Materials will be provided in advance of the workshop and large-print handouts are available if needed by notifying the organizers in advance. If we can help making learning easier for you (e.g. sign-language interpreters, lactation facilities) please get in touch (using contact details below) and we will attempt to provide them.

Contact: Please email peter.humburg@mq.edu.au for more information.



Schedule

Friday

Before starting Ensure you have completed the setup
Morning Recap: Using Git and GitHub
Data Visualisation with R
AfternoonContinuation of Data Visualisation with R
END

We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.


Syllabus

Visualising data with ggplot2

  • Creating plots of continuous variables
  • Visualising categorical data
  • Customising ggplot output
  • Reference...

Version Control with Git, GitHub and RStudio

  • Creating a repository
  • Recording changes to files
  • Viewing changes
  • Working on the web
  • Open licenses
  • Where to host work, and why
  • Reference...

Setup

To participate in a Data Carpentry workshop, you will need access to the software described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

R

R is a programming language that is especially powerful for data exploration, visualization, and statistical analysis. To interact with R, we use RStudio. The R lessons in this workshop rely on the use of Git. Please follow the instructions below to install the Git software and connect it to RStudio.

Windows

Video Tutorial

Install R by downloading and running this .exe file from CRAN. Also, please install the RStudio IDE. Note that if you have separate user and admin accounts, you should run the installers as administrator (right-click on .exe file and select "Run as administrator" instead of double-clicking). Otherwise problems may occur later, for example when installing R packages.

macOS

Video Tutorial

Install R by downloading and running this .pkg file from CRAN. Also, please install the RStudio IDE.

Linux

You can download the binary files for your distribution from CRAN. Or you can use your package manager (e.g. for Debian/Ubuntu run sudo apt-get install r-base and for Fedora run sudo dnf install R). Also, please install the RStudio IDE.

Git

Git is a version control system that lets you track who made changes to what when and has options for easily updating a shared or public version of your code on github.com. You will need a supported web browser (current versions of Chrome, Firefox or Safari, or Internet Explorer version 9 or above).

You will need an account at github.com for parts of the Git lesson. Basic GitHub accounts are free. We encourage you to create a GitHub account if you don't have one already. Please consider what personal information you'd like to reveal. For example, you may want to review these instructions for keeping your email address private provided at GitHub.

Windows

  1. Download the Git for Windows installer.
  2. Run the installer and follow the steps below:
    1. Click on "Next" four times (two times if you've previously installed Git). You don't need to change anything in the Information, location, components, and start menu screens.
    2. Select “Use the nano editor by default” and click on “Next”.
    3. Keep "Use Git from the Windows Command Prompt" selected and click on "Next". If you forgot to do this programs that you need for the workshop will not work properly. If this happens rerun the installer and select the appropriate option.
    4. Click on "Next".
    5. Keep "Checkout Windows-style, commit Unix-style line endings" selected and click on "Next".
    6. Select "Use Windows' default console window" and click on "Next".
    7. Click on "Install".
    8. Click on "Finish".
  3. To ensure that you can use git with RStudio:
    1. Open RStudio.
    2. In the menu, click on "Tools > Global Options...".
    3. Click on "Git/SVN".
    4. Ensure the checkbox "Enable version control interface for RStudio projects" is selected.
    5. Under "Git executable" click on "Browse".
    6. Navigate to the location of git.exe. This is typically located in "C:\Users\<Your-User-Name>\AppData\Local\Programs\Git\bin".
    7. Click "Open".
    8. Click "OK".

This will provide you with both Git and Bash in the Git Bash program.

macOS

Video Tutorial
  1. For OS X 10.9 and higher, install Git for Mac by downloading and running the most recent "mavericks" installer from this list. Because this installer is not signed by the developer, you may have to right click (control click) on the .pkg file, click Open, and click Open on the pop up window. After installing Git, there will not be anything in your /Applications folder, as Git is a command line program. For older versions of OS X (10.5-10.8) use the most recent available installer labelled "snow-leopard" available here.
  2. To ensure that you can use git with RStudio:
    1. Open RStudio.
    2. In the menu, click on "Tools > Global Options...".
    3. Click on "Git/SVN".
    4. Ensure the checkbox "Enable version control interface for RStudio projects" is selected.
    5. Under "Git executable" click on "Browse".
    6. Navigate to the location of the git executable.
    7. Click "Open".
    8. Click "OK".

Linux

  1. If Git is not already available on your machine you can try to install it via your distro's package manager. For Debian/Ubuntu run sudo apt-get install git and for Fedora run sudo dnf install git.
  2. To ensure that you can use git with RStudio:
    1. Open RStudio.
    2. In the menu, click on "Tools > Global Options...".
    3. Click on "Git/SVN".
    4. Ensure the checkbox "Enable version control interface for RStudio projects" is selected.
    5. Under "Git executable" click on "Browse".
    6. Navigate to the location of the git executable. This is typically located in "/usr/bin".
    7. Click "Open".
    8. Click "OK".