Git Product home page Git Product logo

datascientist-getting-and-cleaning-data's Introduction

Goals for the clean up script

The goals for the clean up script are:

  • Merges the training and the test sets to create one data set.
  • Extracts only the measurements on the mean and standard deviation for each measurement.
  • Uses descriptive activity names to name the activities in the data set
  • Appropriately labels the data set with descriptive activity names.
  • Creates a second, independent tidy data set with the average of each variable for each activity and each subject.

Using the run_analyis.R script to clean up the data set

The steps to clean up the UCI HAR dataset are:

  1. clone this repository to your local system
  2. you should see the run_analysis.R script in the folder you extracted the repository to
  3. extract the UCI HAR data set to the folder where you cloned this repository
  4. open R or RStudio
  5. make sure the current working directory is the folder you extracted the repository to
    • use getwd() to check the current working directory and setwd() to set the current working directory
  6. start the script with source("run_analysis.R")

After the script has ran, you should see a newly created set with the filename tidy_data_set.txt in the folder. Please note that the script will overwrite the file if it already exists before running.

Loading the clean data set

You can load the clean data set using the read.table function, e.g.

data <- read.table("tidy_data_set.txt")

View(data)

datascientist-getting-and-cleaning-data's People

Contributors

llvdl avatar

Watchers

 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.