Giter VIP home page Giter VIP logo

cleaning-data-project's Introduction

The file “run_analysis.R” runs a code in R that cleans and summarizes the following data:

https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip

The following link describes the data at length:

http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

Once the R code is run, it will automatically download the necessary files and output the final tidy data text files to the working directory.

The purpose of the R code is to produce a final output file:

  • At first a tidy dataset that neatly shows combined train and test data and with the correct column names with the test subject number and activity name rows is generated. All the columns have been provided with descriptive names. This dataset only shows the mean and standard deviation feature variables.
  • Using this dataset, the final output file, “proj_data_mean.txt”, is created by summarizing the mean values for every feature variable in the previously created tidy dataset for each unique test subject and activity name. This file can be found in the repository.

Here is the basic functioning of this R Code: (Further details can be found in the Code itself)

Step 1: Saves the raw data to working directory and unzips.

Step 2: Combines Test Subject numbers and Activity Numbers to the test and train data.

Step 3: Adds Column names to the training and test data files

Step 4: Merges training and test data sets to form one data set

Step 5: Installs dplyr package to extract only mean and standard deviation variables from data set

Step 6: Changes Activity numbers to Activity names

Step 7: Installs the reshape2 package to melt and cast the data to obtain the mean of each of the feature values for every unique test subject and activity combination.

cleaning-data-project's People

Contributors

ysriram1 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.