The file run_analysis.R downloads the required data from the repository.
The script performs the following actions:
- The script stores the zip file in the ./data/ directory. If the directory does not exist the script creates the directory.
- Once the file is downloaded the zip-file is unzipped in the ./zipdata/ directory.
- From the file features.txt all the available columns are loaded and the columns containing std() or mean() are selected
- From these selected columns 'nice' names are created.
- The training dataset and the test dataset are loaded and only the columns we are interested in are stored
- The test and training activity labels are loaded and joined with activilable texts to create 'nice' names
- The test and training subject data is loaded
- All the columns related to train and test combined to result in two data sets (for train and test)
- Finally these two datasets are combined into one large dataset.
- From this combined dataset, for each activity, subject and variable the mean value is calculated
- This result is stored in the file summary.txt
The Code Book contains a decription of all the variables in the result