Skip to content

Instantly share code, notes, and snippets.

View mGalarnyk's full-sized avatar

Michael Galarnyk mGalarnyk

View GitHub Profile
@mGalarnyk
mGalarnyk / assignment1.md
Last active December 1, 2025 11:17
R Programming Programming Assignment 1 (Week 2) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera

R Programming Project 1

github repo for rest of specialization: Data Science Coursera

For this first programming assignment you will write three functions that are meant to interact with dataset that accompanies this assignment. The dataset is contained in a zip file specdata.zip that you can download from the Coursera web site.

Although this is a programming assignment, you will be assessed using a separate quiz.

The zip file containing the data can be downloaded here: specdata.zip [2.4MB]

@mGalarnyk
mGalarnyk / assignment3.md
Last active October 25, 2025 06:35
R Programming Programming Assignment 3 (Week 4) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera
@mGalarnyk
mGalarnyk / quiz1.md
Created March 7, 2017 18:04
Getting and Cleaning Data Quiz 1 (Week 1) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/3_Getting_and_Cleaning_Data

Getting and Cleaning Data Quiz 1 (JHU) Coursera

Question 1

The American Community Survey distributes downloadable data about United States communities. Download the 2006 microdata survey about housing for the state of Idaho using download.file() from here:

https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv

and load the data into R. The code book, describing the variable names is here:

@mGalarnyk
mGalarnyk / quiz2.md
Created March 7, 2017 18:07
Getting and Cleaning Data Quiz 1 (Week 1) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/3_Getting_and_Cleaning_Data

Getting and Cleaning Data Quiz 2 (JHU) Coursera

Question 1

Register an application with the Github API here https://github.com/settings/applications. Access the API to get information on your instructors repositories (hint: this is the url you want "https://api.github.com/users/jtleek/repos"). Use this data to find the time that the datasharing repo was created. What time was it created? This tutorial may be useful (https://github.com/hadley/httr/blob/master/demo/oauth2-github.r). You may also need to run the code in the base R package and not R studio.

Since many people had issues with this I wrote a blog post on how to do this question: Github API using R

@mGalarnyk
mGalarnyk / quiz3.md
Created March 7, 2017 18:11
Getting and Cleaning Data Quiz 3 (Week 3) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/3_Getting_and_Cleaning_Data

Getting and Cleaning Data Quiz 3 (JHU) Coursera

Question 1

The American Community Survey distributes downloadable data about United States communities. Download the 2006 microdata survey about housing for the state of Idaho using download.file() from here:

https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv

and load the data into R. The code book, describing the variable names is here:

@mGalarnyk
mGalarnyk / quiz4.md
Created March 7, 2017 18:15
Getting and Cleaning Data Quiz 4 (Week 4) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/3_Getting_and_Cleaning_Data

Getting and Cleaning Data Quiz 4 (JHU) Coursera

Question 1

The American Community Survey distributes downloadable data about United States communities. Download the 2006 microdata survey about housing for the state of Idaho using download.file() from here:

https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv

and load the data into R. The code book, describing the variable names is here:

@mGalarnyk
mGalarnyk / quiz1.md
Last active June 5, 2020 19:26
The Data Scientist's Toolbox Quiz 1 (Week 1) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/1_Data_Scientist_Toolbox

The Data Scientist's Toolbox Quiz 1 (JHU) Coursera

github repo for rest of specialization: Data Science Coursera

Question 1

Which of the following are courses in the Data Science Specialization? Select all that apply:

  • Business Analytics
  • Python Programming
@mGalarnyk
mGalarnyk / quiz2.md
Last active September 16, 2022 07:36
The Data Scientist's Toolbox Quiz 2 (Week 2) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/1_Data_Scientist_Toolbox

The Data Scientist's Toolbox Quiz 2 (JHU) Coursera

github repo for rest of specialization: Data Science Coursera

Question 1

Which of the following commands will create a directory called data in your current working directory?

  • mkdir /Users/data
@mGalarnyk
mGalarnyk / quiz3.md
Last active April 19, 2023 03:50
The Data Scientist's Toolbox Quiz 3 (Week 3) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera/tree/master/1_Data_Scientist_Toolbox

The Data Scientist's Toolbox Quiz 3 (JHU) Coursera

github repo for rest of specialization: Data Science Coursera

Question 1

We take a random sample of individuals in a population and identify whether they smoke and if they have cancer. We observe that there is a strong relationship between whether a person in the sample smoked or not and whether they have lung cancer. We claim that the smoking is related to lung cancer in the larger population. We explain we think that the reason for this relationship is because cigarette smoke contains known carcinogens such as arsenic and benzene, which make cells in the lungs become cancerous.

  • This is an example of a causal data analysis.
@mGalarnyk
mGalarnyk / project1.md
Last active June 4, 2025 22:11
The Data Scientist's Toolbox Project John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera

The Data Scientist's Toolbox Project (JHU) Coursera

A image video link walkthrough of the project + answers is available at the end of this quiz.

github repo for rest of specialization: Data Science Coursera

Part 1

The Course Project for this course is pretty straightforward. Now that you’ve learned about the basic tools found in the data scientist’s toolbox, we want to make sure that you’ve assembled those tools and are ready to begin using them. This easy project is your chance to demonstrate that you’ve done the basic software setup (R, RStudio, and Github) that will get you through the rest of the Data Science Specialization.

  1. Install R