This is a repository for Peer Graded Assignment (PGA) Project for the Getting and Cleaning data course
This is a repository for the PGA R script that do the tidying of the "Human Activity Recognition Using Smartphones" Data Set from UCI Machine Learning repository (http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones)
The Data was collected through the experiments that have been carried out with a group of 30 volunteers within an age bracket of 19-48 years. Each person performed six activities (WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING) wearing a smartphone (Samsung Galaxy S II) on the waist. Using its embedded accelerometer and gyroscope, we captured 3-axial linear acceleration and 3-axial angular velocity at a constant rate of 50Hz. The experiments have been video-recorded to label the data manually. The obtained dataset has been randomly partitioned into two sets, where 70% of the volunteers was selected for generating the training data and 30% the test data.
For each record it is provided:
- Triaxial acceleration from the accelerometer (total acceleration) and the estimated body acceleration.
- Triaxial Angular velocity from the gyroscope.
- A 561-feature vector with time and frequency domain variables.
- Its activity label.
- An identifier of the subject who carried out the experiment.
The dataset includes the following files:
- 'features_info.txt': Shows information about the variables used on the feature vector.
- 'features.txt': List of all features.
- 'activity_labels.txt': Links the class labels with their activity name.
- 'train/X_train.txt': Training set.
- 'train/y_train.txt': Training labels.
- 'test/X_test.txt': Test set.
- 'test/y_test.txt': Test labels.
The R script contains in the run_analysis.R file. The script do the following with the Data Set files in the working folder :
-
- 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.
The CodeBook.md indicates and explains transformations performed on the Data and highlights summaries calculated, along with units, and any other relevant information.