Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

celsofaf/GetCleanData_CourseProject

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 

Repository files navigation

ReadMe for Getting and Cleaning Data - Course Project

Instructions to run and understand my analysis

Downloading and preparing to load data

The original data was downloaded from https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip, on 2014-05-14 20:07:28 BRT, into the ./data folder of my working directory. I named it as proj_dataset.zip. Then, it was extracted into the ./data/UCI HAR Dataset folder. The following script did this to me:

if ( !file.exists("./data") )
    dir.create("./data/")
fileDataset <- "./data/proj_dataset.zip"
if ( !file.exists("./data/proj_dataset.zip") ) {
    fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
    download.file(fileUrl, file.dataset, method="curl")
    dateDownloaded <- Sys.time()
    fileDate <- "./data/download_date.txt"
    if ( file.exists(file.date) ) {
        invisible(file.remove(fileDate))
    } else {
        invisible(file.create(fileDate))
    }
    writeLines(paste("Original data downloaded on:", dateDownloaded, "BRT"), fileDate)
}
unzip(fileDataset, list=T)  # many files! let's extract them...
unzip(fileDataset, exdir="./data")
list.files("./data")
list.files("./data/UCI HAR Dataset")

After that, the run_analysis.R script was run to generate my analysis. It is not needed to run the download script before the analysis, as long as the dataset is already unziped on the ./data/UCI HAR Dataset folder, relative to the working directory.

The Code Book contains info on the datasets - the original ones and the one generated by my script and my analysis.

A full description of the original study can be found here: http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

About

Repository for the course project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.