Coder Social home page Coder Social logo

getting_data's Introduction

The script run_analysis.R

  1. Previus task

Before start the scrip we dowload the zipfile from cloudfront.net and extrat it in the working directory, in a subdirectory called "UCI HAR Dataset"

  1. Merges the training and the test sets to create one data set.

We read the data from the "train" and "test" folders and we merge the similiar frames: Data come from x_t????.txt, Labels come from y_t????.txt, and sujets come from subject_t????.txt. 2. Extracts only the measurements on the mean and standard deviation for each measurement.

From the file features.txt we take the names of the frame Data and select the mean and standard deviation for each measurement, then we Extract those measurements from Data frame and the associated names, in the new Data frame. 3. Uses descriptive activity names to name the activities in the data sett

We take the names of each activity from file activity_labels.txt and them we substitute the numeric data in the Labels vector with the descriptive names adding "activity" as the name. 4. Appropriately labels the data set with descriptive variable names.

We add the name "subject" to the subject vector and after we join subject and Labels vectors with Data frame. 5. Creates a second, independent tidy data set with the average of each variable for each activity and each subject.

With the use of for at two levels (one with the subjects and the second with activities) we calculate the average of each variable and the we build an data frame called TidyData. When this frame is complete we write a file called tidy_data_set.txt.

You can see The tidy_data_set.txt Code book.

getting_data's People

Contributors

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