Skip to content

Instantly share code, notes, and snippets.

View mGalarnyk's full-sized avatar

Michael Galarnyk mGalarnyk

View GitHub Profile
# Getting and Cleaning Data Project John Hopkins Coursera
# Author: Michael Galarnyk
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the mean and standard deviation for each measurement.
# 3. Uses descriptive activity names to name the activities in the data set
# 4. Appropriately labels the data set with descriptive variable names.
# 5. From the data set in step 4, creates a second, independent tidy data set with the average of each variable for each activity and each subject.
# Load Packages and get the Data
@mGalarnyk
mGalarnyk / helloWorld.html
Created February 25, 2017 19:28
Hello World HTML for my blog post https://medium.com/@GalarnykMichael
<html>
<header><title>This is title</title></header>
<body>
Hello world
</body>
</html>
@mGalarnyk
mGalarnyk / quiz1.md
Created March 5, 2017 22:55
Exploratory Data Analysis Quiz 1 (Week 1) JHU Coursera for github repo https://github.com/mGalarnyk/datasciencecoursera

Exploratory Data Analysis Quiz 1 (JHU) Coursera

Question 1

Which of the following is a principle of analytic graphics?

  • Make judicious use of color in your scatterplots (NO)

  • Don't plot more than two variables at at time (NO)

@mGalarnyk
mGalarnyk / quiz2.md
Created March 5, 2017 23:10
Exploratory Data Analysis Quiz 2 (Week 2) for the John Hopkins Data Science Specialization github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/4_Exploratory_Data_Analysis

Exploratory Data Analysis Quiz 2 (JHU) Coursera

Question 1

Under the lattice graphics system, what do the primary plotting functions like xyplot() and bwplot() return?

  • nothing; only a plot is made

  • an object of class "lattice"

@mGalarnyk
mGalarnyk / project1.md
Last active March 9, 2023 02:16
Exploratory Data Analysis Project 1 (Week 1) John Hopkins Data Science Specialization for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/4_Exploratory_Data_Analysis

Exploratory Data Analysis Project 1

This assignment uses data from the UC Irvine Machine Learning Repository, a popular repository for machine learning datasets. In particular, we will be using the “Individual household electric power consumption Data Set” which I have made available on the course web site:

Dataset: Electric power consumption [20Mb]
Description: Measurements of electric power consumption in one household with a one-minute sampling rate over a period of almost 4 years. Different electrical quantities and some sub-metering values are available.

library("data.table")
@mGalarnyk
mGalarnyk / project2.md
Created March 5, 2017 23:40
Exploratory Data Analysis Project 2 (John Hopkins Data Science Coursera) for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/4_Exploratory_Data_Analysis

Exploratory Data Analysis Project 2 (JHU) Coursera

Unzipping and Loading Files

library("data.table")
path <- getwd()
download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
              , destfile = paste(path, "dataFiles.zip", sep = "/"))
unzip(zipfile = "dataFiles.zip")
@mGalarnyk
mGalarnyk / quiz1.md
Last active February 20, 2024 23:43
R Programming Quiz 1 (Week 1) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera

R Programming Quiz 1 (JHU) Coursera

github repo for rest of specialization: Data Science Coursera

Question 1

R was developed by statisticians working at...

Answer

The University of Auckland

@mGalarnyk
mGalarnyk / quiz2.md
Last active June 13, 2023 09:01
R Programming Quiz 2 (Week 2) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera

R Programming Quiz 2

github repo for rest of specialization: Data Science Coursera

Question 1

Suppose I define the following function in R

@mGalarnyk
mGalarnyk / quiz3.md
Last active December 8, 2024 18:06
R Programming Quiz 3 (Week 3) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera

R Programming Quiz 3

github repo for rest of specialization: Data Science Coursera

Question 1

Take a look at the 'iris' dataset that comes with R. The data can be loaded with the code:

library(datasets)
@mGalarnyk
mGalarnyk / quiz4.md
Last active February 21, 2024 09:50
R Programming Quiz 4 (Week 4) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera

R Programming Quiz 4

github repo for rest of specialization: Data Science Coursera

Question 1

What is produced at the end of this snippet of R code?

set.seed(1)