Giter VIP home page Giter VIP logo

gettingcleaningdataproject's Introduction

Course Project Repository for Coursera's "Getting and Cleaning Data" class.

The script run_analysis.R reads in data scattered in multiple files, massages that data to a usable format in a single data structure, and then uses this single data structure to write a file giving one perspective of the original data.

  1. Download the following zip file which contains all needed input data files. https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip

    A full description of this data is available from its original location: http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

  2. Place the above downloaded file in a directory called WORK from which you are able to run R scripts. You should have --> ... WORK/getdata_projectfiles_UCI HAR Dataset.zip

  3. From the directory WORK, unzip the above zip file, accepting the extract defaults. This should result in a new directory containing several text files with the following path structure: --> ... WORK/getdata_projectfiles_UCI HAR Dataset/UCI HAR Dataset/{test, train}/... NOTE: If your operating system does not support space characters in directory (or file) names, or if the path structure of the extracted contents of the downloaded zip file have changed, you will need to update the path arguments provided to read.table() on lines 4 through 11 of the run_analysis.R script in order to be sure all data input required by the script is obtained.

  4. Place the script run_analysis.R found in this Github repository in the above mentioned directory called WORK. You should have --> ...WORK/run_analysis.R

  5. Run the R script run_analysis.R. run_analysis accomplishes the following tasks. Please see the file CodeBook.md in this Github repository for more information about the data and how it is transformed to a useful format.

    A. Reads in 8 text data files from the data downloaded above.

    B. Combines all data of interest to a single dataset.

    C. Reduces dataset to include only measurements of 'mean' and 'standard deviation'.

    D. Ensures dataset values are text values if available.

    E. Ensures column names are useful, descriptive.

    ... At this point, a "tidy" dataset is accessible to run_analysis.R ...

    F. Creates and writes the file "tidy_data.txt" to the WORK directory.

  6. The output of running run_analysis.R, tidy_data.txt, contains the mean value for each of the measurements retained above in 5C. One way to view the contents of tidy_data.txt is to issue the following commands at the R prompt when the WORK directory described above is R's current working directory.

data <- read.table("tidy_data.txt", header=TRUE)

View(data)

gettingcleaningdataproject's People

Contributors

smkeil avatar

Watchers

 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.