Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.74 KB

File metadata and controls

68 lines (49 loc) · 1.74 KB

Codebook

Prerequisites

For the run_analysis.R script to work you need to load dplyr package and download and exctract the files on your working directory.

files

Here are the data for the project: https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip

Variables

activity_label

activity_label has one of the following values

  1. WALKING
  2. WALKING_UPSTAIRS
  3. WALKING_DOWNSTAIRS
  4. SITTING
  5. STANDING
  6. LAYING

subject

There are 30 subjects in the data set. Subject has a value from 1 to 30.

signals

Following signals are used to estimate variables of the feature vector for each pattern:
'-XYZ' is used to denote 3-axial signals in the X, Y and Z directions.

  1. tBodyAcc-XYZ
  2. tGravityAcc-XYZ
  3. tBodyAccJerk-XYZ
  4. tBodyGyro-XYZ
  5. tBodyGyroJerk-XYZ
  6. tBodyAccMag
  7. tGravityAccMag
  8. tBodyAccJerkMag
  9. tBodyGyroMag
  10. tBodyGyroJerkMag
  11. fBodyAcc-XYZ
  12. fBodyAccJerk-XYZ
  13. fBodyGyro-XYZ
  14. fBodyAccMag
  15. fBodyAccJerkMag
  16. fBodyGyroMag
  17. fBodyGyroJerkMag

The set of variables that were estimated from these signals are:

  • mean(): Mean value
  • std(): Standard deviation

run_analysis.R script

The script does the following:

  1. Merges the training and the test sets to create one data set.
  2. Extracts only the measurements on the mean and standard deviation for each measurement.
  3. Uses descriptive activity names to name the activities in the data set
  4. Appropriately labels the data set with descriptive variable names.
  5. 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.

Outcome

The script returns a data set with the average of each variable for each activity and each subject.