Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rodolfocoursera/GCAS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting and Cleaning Data Project

Introduction

Starting from two data sets related with Human Activity Recognition Using Smartphones, a new "tidy" dataset is generated with only mean and standard deviation variables and the mean for each subject and activity.

The original datasets include the data collected from the embedded accelerometer and gyroscope of a smartphone while a person, wearing the phone, performed six activities from walking to laying.

##Files

  • README.md. The present file that explains how all the files all related

  • CodeBook.md. Contains the description of the dataset variables and an explanation about the data and its transformation.

  • run_analysis.R. The script that generates MeanTidySet.txt, a comma-separated file resulting of merge and transform both test and train datasets from Human Activity Recognition Using Smartphones Dataset.

##The script The script does the following tasks in order to produce a "tidy" dataset meanTidySet.txt that can be used for later analysis:

  1. The training and the test sets were merged to create one data set.
  2. The variables not related to both the mean and standard deviation were removed. Specifically those whose name not contained "mean()" or "std()", excepting for Subject and ActivityId variables.
  3. The activity Id was replaced with the descriptive activity names: WALKING, WALKING UPSTAIRS, WALKING DOWNSTAIRS, SITTING, STANDING, LAYING.
  4. The columns were named with descriptive names.
  5. A data set with the average of each variable for each activity and each subject was created.
  6. The data were sorted by subject and name of the activity. subject.
  7. A TXT comma-separated file was created from the data obtained in the point 6.

Prerequisites

The run_analysis.R script requires these datasets in the same working directory used by the script run_analysis.R:

  • UCI HAR Dataset/train/X_train.txt and
  • UCI HAR Dataset/test/X_test.txt data sets

These files can be download at https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages