Git Product home page Git Product logo

tidy-data's Introduction

tidy-data

Getting and Cleaning Data Course Project

This repo consists of the following as a part of the Course project for the "Getting and Cleaning Data" Coursera course:

  • README.md provides a description of the contents of this repo
  • run_analysis.R provides the R script for this assignment
  • Codebook provides a description of the data that is generated using run_analysis.R

As a part of this project, data collected using Samsung sensors (accelerometer and gyroscope) on 30 voluteers are acquired and tidied. The original source of the data is "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"

run_analysis.R

The script run_analysis.R assumes that a folder entitled "UCI HAR Dataset" is stored in the working directory. The "UCI HAR Dataset" must contain

  • 'features.txt': List of all features.
  • 'activity_labels.txt': Links the class labels with their activity name.
  • 'train/X_train.txt': Training set.
  • 'train/y_train.txt': Training labels.
  • 'test/X_test.txt': Test set.
  • 'test/y_test.txt': Test labels.
  • 'train/subject_train.txt': Subject labels for training set.
  • 'test/subject_test.txt': Subject labels for test data set.

run_analysis.R reads these text files as R objects. It then merges the test and training set data. Only mean and standard deviation data are selected. Then this data is grouped by a subject ID that ranges from 1 to 30 as well as descriptive activity labels. Labels for variables in the data set are acquired from features.txt. Further descriptions on the variable names is provided in the Codebook. The script also evaluates the means and standard deviations of the selected data grouped by subject ID and activity. It then generates a tidy data text file that meets the principles of tidy data in the following ways

  • Each variable forms a column
  • Each observation for a given subject doing a specific activity forms a row
  • The table stores data of the same type i.e. sensor measurements

tidy-data's People

Contributors

bbamini 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.