Summary and Setup
Data Carpentry’s aim is to teach researchers basic concepts, skills, and tools for working with data so that they can get more done in less time, and with less pain. The lessons below were designed for those interested in working with social sciences data in R.
This is an introduction to R designed for participants with no programming experience. These lessons can be taught in a half-day, full-day, or over a two-day workshop (see Instructor Notes for suggested lesson plans). They start with some basic information about R syntax, the RStudio interface, and move through how to import CSV files, the structure of data frames, how to deal with factors, how to add/remove rows and columns, how to calculate summary statistics from a data frame, and a brief introduction to plotting.
Getting Started
Data Carpentry’s teaching is hands-on, so participants are encouraged to use their own computers to ensure the proper setup of tools for an efficient workflow.
These lessons assume no prior knowledge of the skills or tools.
To get started, follow the directions in the “Setup” tab to download data to your computer and follow any installation instructions.
Prerequisites
This lesson requires a working copy of R and
RStudio.
To most effectively use these materials,
please make sure to install everything before working through
this lesson.
About the example data
We will be working with a dataset of 200 Youtube posts. Here is some background to the dataset.
- An initial dataset of 314 posts were returned by the YouTube API in response to the following query: “Query: clicks south africa* hair (ad OR advertisement) -click” covering videos posted during the period 2020 - 2023
- The dataset was prepared using a spreadsheet and OpenRefine to identify missing values, change variable names to “snake case”, change tags and topics to lowercase, and to use semicolons to separate tags and topics.
- Owing to the ambiguity of the keyword “clicks”, many irrelevant results were returned. - The dataset was reviewed and any posts which were not related to the controversy, or which did not relate to issues about body politics and racism were excluded.
- This resulted in a dataset of 200 posts selected for computational analysis. In case you need a refresher, here are some details about how YouTube API derives the variables in this dataset.
FIXME: Setup instructions live in this document. Please specify the tools and the data sets the Learner needs to have installed.
Data Sets
Download the data zip file and unzip it to your Desktop
Software Setup
Details
Setup for different systems can be presented in dropdown menus via a
solution
tag. They will join to this discussion block, so
you can give a general overview of the software used in this lesson here
and fill out the individual operating systems (and potentially add more,
e.g. online setup) in the solutions blocks.
Use PuTTY
Use Terminal.app
Use Terminal