Skip to content

Repository for the assignment in the Getting and Cleaning Data course from Coursera

Notifications You must be signed in to change notification settings

mafritsch/CourseraGettingAndCleaningData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repository contains the data for the assignment in the Coursera "Getting and Cleaning Data" course.

Files

The repository contains the following files:

  • 'README.md': This file that gives an overview over the content of the repository
  • 'CodeBook.md': The codebook that describes the variables used in the 'tidy.txt' file.
  • 'run_analysis.R': The R program that processes the raw data and produces the 'tidy.txt' file.
  • 'tidy.txt': The result file written from the 'run_analysis.R' script.

Function of the 'run_analysis.R' file

  1. When the data Zip file has not already been downloaded it will be downloaded into 'dataset.zip'
  2. If the 'dataset.zip' file has not already been unpacked it will be unpacked.
  3. All required files are loaded into R.
  4. All test data and training data are merged together respectively into merged dataframes.
  5. All features with mean() and std() are determined.
  6. The names of the features are tidied. That is all spaces, dashes, brackets and commas are removed.
  7. Only the measurements for mean and standard deviation are kept from the training data and test data.
  8. The activity codes are replaced with the readable description.
  9. Feature names, activities, subject ids and measurements are merged into one dataframe.
  10. The dataframe is grouped by users and activities.
  11. The mean is calculated with respect to the groups from the previous step.
  12. The new dataframe is written to file.

About

Repository for the assignment in the Getting and Cleaning Data course from Coursera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages