Skip to content
Adam Blake edited this page May 7, 2020 · 1 revision

The easiest way to get up and running with class data from our course is to use our custom R package ‘CourseKataData’ which can be found at https://github.com/UCLATALL/CourseKataData. The package will unpack and pre-process the data for you to make it a little more manageable. If you aren’t comfortable with using R, we still recommend that you use this package to process the data before continuing with your preferred statistical methods.

The absolute simplest way to get running is only a few lines of code in R:

# install a package to install the processing package
install.packages('devtools')

# install the processing package
devtools::install_github('UCLATALL/CourseKataData')

# load the package
library(CourseKataData)

# process the data (change the path to point to your downloaded zip file)
process_data('path/to/your/data')

By default, the data will be loaded into R objects. R has a number of tools for exporting objects to standard formats. A common format that can be read by most programs (including Excel, Stata, SAS, SPSS) is the comma-separated value (CSV) format. You can export to CSV format with the following code:

write.csv(responses, 'path/to/save/the/csv/to', na = '', row.names = FALSE)
# responses is only one of the objects that is created by process_data()
# make sure you export all the data you need

Automatically Merge Multiple Downloads

If you have downloaded multiple data download zip files from CourseKata, don’t worry, this package takes care of merging the files for you. To load multiple data downloads into R, specify a vector of zip files or directories to load:

zip_paths <- c("path/to/first/zip", "path/to/second/zip", "path/to/a/directory")
process_data(zip_paths)

Table of Contents

Guides

Understanding the Data

Code books

Clone this wiki locally