Code Monkey home page Code Monkey logo

wk_4_project's Introduction

Getting-Cleaning-Data Course Project

This readme document describes step by step how to prepare and clean the dataset presented in the Course Project.

Unzip the source file with the data in a local directory of your machine (you can find the zip file here: https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip).

Copy the "run_analysis.R" script in your R working directory.

Make sure that all the files your are going to read from the unzipped folder, are placed in your working directory.

features.txt activity_labels.txt X_train.txt subject_train.txt y_train.txt X_test.txt subject_test.txt y_test.txt Run the "run_analysis.R" script. The main steps performed in the "run_analysis.R" script have been the following:

Reading data from each single .txt file using the read.table command Merge train data horizontally with its corrspondent subject and activity columns, using cbind function. Do the same with test data. Merge train and test data vertically using the rbind function. Assign activity_num to their correspondent activity_type values using a lookup table, and finally add the activity_type column to the merged data set Subset only measurement of the mean and standard deviation Create a new idependent data set with the average of each variable for each activity and each subject, using the aggregate function. Write the resulting data set into a .txt file names "tidy_dataset_with_avg.txt".

wk_4_project's People

Contributors

iqbal316 avatar

Watchers

James Cloos 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.