Giter Site home page Giter Site logo

datacleaning's Introduction

Introduction

The script run_analysis.R processes data from Smartphone Sensors. A description of the project that collected the raw data can be found at http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones . Raw data was obtained from the zip file at https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip . A detailed description of how the data was aquired and individual observations were processed can be found in the features_info.txt file within this zip file.

Code Description

Raw data is downloaded as a zip file from <a href="https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip", unzipped and relevant text files are read into dataframes. Data from corresponding files in the training and testing dataset are combined rowwise using the rbind() function. Column variables are then assigned from the features.txt file. Irrelevant columns that don't contain information about means or standard deviations are being discarded. Columns for subject number and activity performed during the measurement are being added to the dataframe using cbind(). Numeric codes for activities are replaced by a factor with descriptive labels. The resulting dataframe 'tidytable' contains only tidy data.

A second tidy dataframe 'tidyaveraged' is created which in each line contains the averaged means and standard deviations for each subject/activity combination.

This dataframe is finally written to a text file 'UCIHAR_averaged.txt' that can be read with read.table("UCIHAR_averaged.txt",header = TRUE). Each line corresponds to averaged information about one activity type performed by one subject.

Notes:

meanFreq() was discarded from the study because it doesn't reflect the mean of the sample angles were discarded from the study even when they contained mean vectors because they are further computations of the data, not means themselves

datacleaning's People

Contributors

lars-von-buchholtz avatar

Watchers

 avatar

Forkers

cristianku

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.