Basement Lab, Humanities Bridgeford St. Building, Cathie Marsh Institute for Social Research

July 19-20, 2018

9:00 - 17:00

Instructors: Peter Smyth

Helpers: FIXME

General Information

Data Carpentry workshops are for any researcher who has data they want to analyze, and no prior computational experience is required. This hands-on workshop teaches basic concepts, skills and tools for working more effectively with data.

This is the first workshop at the University of Manchester for the recently released Social Sciences curriculum which was developed here. In this workshop we will teach the R programming language materials as well as the lessons covering; Spreadsheets, OpenRefine and SQL.

We will cover Data organization in spreadsheets and OpenRefine, SQL for data management , Introduction to R and Basic Analysis and Visualisation in R . Participants should bring their laptops and plan to participate actively. By the end of the workshop learners should be able to more effectively manage and analyze data and be able to apply the tools and approaches directly to their ongoing research.

Who: The course is aimed at graduate students and other researchers. You don't need to have any previous knowledge of the tools that will be presented at the workshop.

Where: University of Manchester. Get directions with OpenStreetMap or Google Maps.

When: July 19-20, 2018. Add to your Google Calendar.

Requirements: 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 are also 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.smyth@manchester.ac.uk for more information.


Surveys

Please be sure to complete these surveys before and after the workshop.

Pre-workshop Survey

Post-workshop Survey


Schedule

Thursday 19th

Morning Data organization in spreadsheets and OpenRefine
Morning Data organization in spreadsheets and OpenRefine
Afternoon SQL for data management

Friday 20th

Morning Introduction to R
Morning Basic Analysis and Visualisation in R

Syllabus

Data organization in spreadsheets

  • Introduction
  • Formatting data tables in Spreadsheets
  • Formatting problems
  • Dates as data
  • Quality assurance
  • Exporting data
  • Reference...

OpenRefine

  • Introduction
  • Working with OpenRefine
  • Filtering and Sorting with OpenRefine
  • Examining Numbers in OpenRefine
  • Using scripts
  • Exporting and Saving Data from OpenRefine
  • Other resources in OpenRefine
  • Reference...

SQL for data management

  • What is a Relational database
  • Using DB Browser for SQLite
  • The Select statement
  • Missing data
  • Creating new columns
  • Aggregations
  • Creating tables and views
  • The SQLite command line
  • Joins
  • Using database tables in other environments
  • Reference...

Introduction to R

  • Before we start
  • Introduction to R
  • Starting with Data
  • Introducing dplyr and tidyr
  • Data visualisation with ggplot2
  • 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.

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.

OpenRefine

For this lesson you will need OpenRefine and a web browser. Note: this is a Java program that runs on your machine (not in the cloud). It runs inside a web browser, but no web connection is needed.

Windows

Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser. It will not run correctly in Internet Explorer.

Download software from http://openrefine.org/

Create a new directory called OpenRefine.

Unzip the downloaded file into the OpenRefine directory by right-clicking and selecting "Extract ...".

Go to your newly created OpenRefine directory.

Launch OpenRefine by clicking google-refine.exe (this will launch a command prompt window, but you can ignore that - just wait for OpenRefine to open in the browser).

If you are using a different browser, or if OpenRefine does not automatically open for you, point your browser at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.

Mac

Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser. It may not run correctly in Safari.

Download software from http://openrefine.org/.

Create a new directory called OpenRefine.

Unzip the downloaded file into the OpenRefine directory by double-clicking it.

Go to your newly created OpenRefine directory.

Launch OpenRefine by dragging the icon into the Applications folder.

Use Ctrl-click/Open ... to launch it.

If you are using a different browser, or if OpenRefine does not automatically open for you, point your browser at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.

Linux

Check that you have either the Firefox or the Chrome browser installed and set as your default browser. OpenRefine runs in your default browser.

Download software from http://openrefine.org/.

Make a directory called OpenRefine.

Unzip the downloaded file into the OpenRefine directory.

Go to your newly created OpenRefine directory.

Launch OpenRefine by entering ./refine into the terminal within the OpenRefine directory.

If you are using a different browser, or if OpenRefine does not automatically open for you, point your browser at http://127.0.0.1:3333/ or http://localhost:3333 to use the program.

DB Browser for SQLite

The software can be downloaded from the [DB Browser](http://sqlitebrowser.org/) site From the front page you can select the version you require. There are specific downloads for Windows and Mac users. For various Linux distributions there are detailed instructions at the bottom of the page.

Installing on Windows

For a current Windows environment the 64-bit windows download will be most appropriate. The download is a windows executable file which you can run by double clicking it. It opens an installation wizard. You can default all of the options in the wizard. You will require admin permissions on the PC/Laptop you install on. By default the application is launched automatically when the installation is complete. It does not create an icon on the desktop. To explicitly launch the application after installing it, use the windows button (bottom left of screen) and type in ‘DB Browser’ in the search bar and selecting the application when it appears.

Install the SQLite Shell program

The SQLite shell can be downloaded from [here](https://sqlite.org/download.html). There are versions available for Linux, Mac and Windows. As I have a Windows machine I will download the Windows version. You should download the version appropriate to your machine. The number after the x86- may be different when you download if a later version has been released. The download is a .zip file. You need to unzip the file and store the contents (3 files) in a folder of your choosing. There is no actual install process, the program (file) sqlite3.exe can be run directly from the folder. You may however like to add the folder location to your PATH environment variable so that you can call sqlite3 from any command prompt.

Invoke the SQLite Shell program

You invoke the SQLite Shell from the commandline. Remember that the program is sqlite3 and you must have added the folder name to your envirnment PATH or explicitly navigated to the folder before trying to run the program. You do not need to specify any parameters, connection to a databse can be done from within the shell.