Skip to content

SalimahM/Getting-and-Cleaning-Data-Course-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Coursera Getting and Cleaning Data - Course Project

Introduction

This document describes the course project that I have completed for the Module 3 “Getting and Cleaning Data” of Coursera Data Science specialization track. This course project is worth 40% of the final grade.

Project Objective

The purpose of this project is to demonstrate the ability to collect, work with, and clean a data set. The goal is to prepare tidy data that can be used for later analysis.

Instruction

As the course project to Getting and Cleaning Data on Coursera, this project will download and extract raw data from https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip automatically, and complete the following steps as is instructed. Create one R script called run_analysis.R that 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.

Activities

Specific steps in run_analysis.R are as follows:

  1. Download the dataset if it does not already exist in the working directory.
  2. Load the activity and feature information.
  3. Loads both the training and test datasets, keeping only those columns that reflect a mean or standard deviation.
  4. Loads the activity and subject data for each dataset, and merges those columns with the dataset.
  5. Merges the two datasets.
  6. Converts the activity and subject columns into factors.
  7. Creates a tidy dataset that consists of the average (mean) value of each variable for each subject and activity pair.

The output is shown in the file TidyData.txt.

Files

  • README.md - this file that describes the project
  • CodeBook.md - the code book
  • run_analysis.R - Primary script to process the data
  • TidyData.txt – the clean data ready for analysis

Data Source

http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones 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