This project aims on creating a tidy data set to downstream analysis.
The original data set is from experiments made with a group of 30 volunteers. Each person performed six activities wearing a smartphone Samsung Galaxy S II on the waist. The data was collected using the smartphone accelerometer.
The performed activities were walking, walking upstairs, walking downstairs, sitting, standing and laying.
These are five steps to create the tidy data set:
- Merges the training and the test sets to create one data set.
- Extracts only the measurements on the mean and standard deviation for each measurement.
- Uses descriptive activity names to name the activities in the data set
- Appropriately labels the data set with descriptive variable names.
- From the data set in step 4, creates a second, independent tidy data set with the average of each variable for each activity and each subject.
- Download the file from https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
- Unzip the content in the project directory
- Set the project directory as the working directory
- Run the command
source('./file_reader.R')
andsource('./run_analysis.R')
- Run the function
runAnalysis()
Calling the function runAnalysis()
the tidy data generated is saved on a text file named tidy_data.txt in the working directory.
The script run_analysis.R is responsible for doing the analysis, collecting, working with, and cleaning a data set. As result, we have a tidy data to downstream analysis.
Codebook.md has information about the variables in the data set not contained in the tidy data, the summary choices made and the experimental study design used.