Giter VIP home page Giter VIP logo

datasciencecourseradatacleaningproject's Introduction

Data Science (Coursera) Data-Tidying Project

Original Data Source

Data from experiments involving 30 volunteers performing six activities (WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING) wearing a smartphone (Samsung Galaxy S II) were obtained via the following link:

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

The original data, which were split into a training set of over 7,000 cases and a test set of over 2,000 cases, include 561 features representing various measurements obtained from the mobile phones' sensor signals.

R Script to Consolidate and Tidy Up Data

The R script file "run_analysis.R" contains code to perform the following and create tidy dataset in the form of R data frame "tidyData":

  • Merge the training and test datasets into a combined dataset of over 10,000 cases
  • Extract only the means and standard deviations of the measured features, resulting in a smaller set of 66 features from the original 561
  • Label the classified activities and the features descriptively

The script also creates a second tidy data frame "tidyData2", which captures only the averages of the features in "tidyData" for each activity and each subject.

After the script finishes running, the results are two data frames "tidyData" and "tidyData2", and two corresponding output text files "tidyData.txt" and "tidyData2.txt". Other interim variables are removed to minimize memory usage.

How to Execute "run_analysis.R"

Do the following to execute the script "run_analysis.R":

  • Download and unzip the source data from the above weblink
  • Place the data folder "UCI HAR Dataset" in the R working directory
  • Run the script "run.analysis.R", which will produce output text files "tidyData.txt" and "tidyData2.txt" in the "UCI HAR Dataset" folder

datasciencecourseradatacleaningproject's People

Contributors

thevinhluong102 avatar

Watchers

 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.