Giter Site home page Giter Site logo

cleaningdata_courseproj's Introduction

Purpose

The purpose of this project is to demonstrate my ability to collect, work with, and clean a data set. The goal is to prepare tidy data that can be used for later analysis.

The following items are includes in this repository for submission:

  1. This README.md to explain how all of the scripts work and how are connected.

  2. A script, run_analysis.R, for performing the analysis.

  3. A code book, CodeBook.md, that describes the variables, the data, and any transformations or work that you performed to clean up the data.

  4. The resultant tidy data set, with the average of each variable for each activity and each subject.

Note: Raw Dataset is here: https://raw.githubusercontent.com/thecapacity/CleaningData_CourseProj/master/tidy_data.txt

Requirements

The contents of this repository were created on a Macbook running OSX 10.9.5 and RStudio Version 0.98.1087

The only library requirement is data.table

It is not strictly necessary to re-run all elements of this repository, the tidy data included (from step #4) can be read directly into an R script with the command:

data <- read.table(file_path, header = TRUE) 

Usage

This repository includes an R script called run_analysis.R that does the following:

  1. Merges the training and the test sets to create a unified, temporary, data set.

  2. Extracts only the measurements on the mean and standard deviation for each measurement. Note: For this assignment mean and standard deviation measurements are assumed to be those explicitly marked as -mean() or -std().

  3. Uses descriptive activity names to name the activities in the data set.

  4. Appropriately labels the data set with descriptive variable names.

  5. Creates a second independent tidy data set, with the average of each variable for each activity and each subject.

To run this script it is recommended, but not required, that you have unzipped the original dataset (see below) into the working directory. More details are in the CodeBook also included in this repository.

Assuming the data is available, the script run_analysis.R can be executed via normal R-means (e.g. source() or Cmd-Enter in R-Studio on a Mac).

Background

One of the most exciting areas in all of data science right now is wearable computing - see for example this article.

Companies like Fitbit, Nike, and Jawbone Up are racing to develop the most advanced algorithms to attract new users. The data linked to from the course website represent data collected from the accelerometers from the Samsung Galaxy S smartphone.

cleaningdata_courseproj's People

Contributors

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