https://github.com/gereleth/getdatacourse
A course project for "Getting and Cleaning Data" course
https://github.com/gereleth/getdatacourse
Last synced: 3 months ago
JSON representation
A course project for "Getting and Cleaning Data" course
- Host: GitHub
- URL: https://github.com/gereleth/getdatacourse
- Owner: gereleth
- Created: 2015-12-24T12:55:18.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-24T13:25:38.000Z (almost 10 years ago)
- Last Synced: 2025-04-09T07:12:02.857Z (6 months ago)
- Language: R
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This script uses data from "Human Activity Recognition Using Smartphones Data Set". A full description is available at the site where the data was obtained:
[http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones](http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones)
The data for the project were downloaded from [here](https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip).
File "run_analysis.R" does the following:
1. Reads dataset files. It assumes that the data are in the "data" folder in the same directory as the script. This can be changed by modifying the "datadir" variable in the script.
2. Extracts features that correspond to means and standard deviations of each measurement.
3. Assigns descriptive names to the extracted features.
4. Adds activity and subject columns to feature dataframes using descriptive labels for activities.
5. Merges train and test datasets.
6. Computes averages of all variables for all activity-subject combinations.
7. Saves the resulting dataframe to "averages.txt" file.
Full list of variables of the resulting dataset is available in the "CodeBook.md" file.