Giter Site home page Giter Site logo

getting-and-cleaning-data-coursera-project's Introduction

Getting-and-cleaning-data-coursera-project

Firstly I would like to apologize in case this files are not perfectly clear becouse of my lack of command of the language. Unfortunately english is not my mother tongue.

As mentioned in the project instructions: The purpose of this project is to demonstrate your ability to collect, work with, and clean a data set. The goal is to prepare tidy data that can be used for later analysis. You will be graded by your peers on a series of yes/no questions related to the project. You will be required to submit: 1) a tidy data set as described below, 2) a link to a Github repository with your script for performing the analysis, and 3) a code book that describes the variables, the data, and any transformations or work that you performed to clean up the data called CodeBook.md. You should also include a README.md in the repo with your scripts. This repo explains how all of the scripts work and how they are connected.

You can find in this repo the run_analysis.R file which contains the complete R script. The following sections describes briefly the content of the script:

1- Firstly the script downloads and unzips the raw databases (txt files) and save them in the working directory

2- Secondly it creates the data tables of all the data sets included in the "UCI HAR Dataset" directory

3- Then it creates the combined data set by adding the training set to the test set. It gives the same column names as the initial data sec. It also gives names to the "activity labels" columns.

4- Next it merges all the data sets by column binding the already created three data sets.

5- Using the grepl function (which gives a logical vector) it selects all the column's names containing the word "mean" or "sd". With this logical vector it creates the data set with only the measurements on the mean and standard deviation for each measurement. It also names the first two columns ("Activity_Label" and "NumSubjetct") previously binded. Inmediatly after this it merges by the "Activity_Label" both the activity_labels data set (that inks the class labels with their activity name) and the complete (only mean and standard deviation columns) data set.

6- Finally it creates a new data set by collapsing the previous set by the "NumSubject" and "Activity_Label" returning means for each of the numerical variables.

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.