Giter VIP home page Giter VIP logo

getting-and-cleaning-data's Introduction

Getting and Cleaning Data Course Project - "Human Activity Recognition Using Smartphones"

Background

The provided script manipulates and cleans up the dataset "Human Activity Recognition Using Smartphones" provided by the UCI Machine Learning Repository. This dataset contains the results of an experiment which involved 30 subjects ranging from 18-48 years of age. The subjects had a smartphone with an accelerometer and gyroscope attached to their waists and were observed as they completed a number of tasks, recording 3-axial angular velocity measurements. These raw measurements were then further manipulated before being compiled in the dataset.

More information about this dataset is available under the following address: http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

About This Script

The script run_analysis.R checks to see if the zipped dataset file already exists in the user's working directory and otherwise downloads the dataset provided by the UCI Machine Learning Repository.

The downloaded .ZIP archive is then unzipped (if the unzipped directory is not already detected) and the provided training and test sets are merged in order to create one data set, extracting only the measurements of mean and standard deviation for each measurement. The activities in this dataset are named descriptively based on tidy verisions of the original labels provided in the dataset (for a detailed description of each activity, see the corresponding entry in CODEBOOK.md). Additionally, all of the variables in this dataset are provided a descriptive name (see a detailed description in CODEBOOK.md).

Finally, this script produces a tidy dataset containing only the average of each variable for each activity and each subject, which is contained in the file tidy.txt. The script displays the tidy dataset upon completion.

Viewing This Script's Results

In order to view the resulting tidy dataset generated by this script, run the following code in your R console:

url <- "https://raw.githubusercontent.com/kcole93/gettingandcleaningdata/master/tidy.txt"
url <- sub("^https", "http", url)
data <- read.table(url(url), header = TRUE)
View(data)

getting-and-cleaning-data's People

Contributors

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