Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HW2 (resubmitted) #1

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
1fa310c
Submission of Hw1
Feb 4, 2015
5ab2963
submission
Feb 4, 2015
004e070
A file was deleted
Feb 4, 2015
3f055ec
Submit HW2
denistanwh Feb 26, 2015
1c840dc
Updated HW2
denistanwh Feb 28, 2015
2af2049
hw2
kuailema1217 Mar 1, 2015
9deb1c9
add hw2
Mar 2, 2015
926a332
delete a file
Mar 2, 2015
63ea737
hw2 submit
mghaz Mar 2, 2015
74ec5bd
2014-03-02-Dane Holding-hw2
holdind Mar 2, 2015
5648829
Revert "2014-03-02-Dane Holding-hw2"
holdind Mar 2, 2015
4fedd09
2014-03-02-Dane Holding-hw2
holdind Mar 2, 2015
d7f8f2e
Revert "2014-03-02-Dane Holding-hw2"
holdind Mar 2, 2015
027501b
2015-3-02-Dane_Holding-HW2
holdind Mar 2, 2015
2ac987e
add hw2
Mar 2, 2015
2a7d8ac
Yuzhe-Zhou hw02
Mar 2, 2015
e5d62fe
Add Ryan Lakritz's HW2
ryanlakritz Mar 2, 2015
46865b0
hw2
sangheemin Mar 2, 2015
c1300c8
Clean HW2 branch
fresques Mar 2, 2015
cf37303
add hw2
YuhuiYang Mar 2, 2015
b6e9315
HW2 HTML Dhruv Nair
DN6 Mar 2, 2015
3f466a3
minor update in instructions on how to submit assignments
Mar 2, 2015
aa438c6
Added Melissa Ragonese's HW2
melissaragonese Mar 2, 2015
a08eada
2015_03_01_AliceBaird_HW2
Mar 2, 2015
b32f878
add hw2 with two files
aliciajin Mar 2, 2015
b0333ed
Merge pull request #75 from mghaz/hw2
Mar 3, 2015
7889a25
Merge pull request #78 from aliciajin/master
Mar 3, 2015
b18f0fb
Merge pull request #76 from aliceebaird/hw2
Mar 3, 2015
35b53f0
Merge pull request #74 from DN6/hw2
Mar 3, 2015
1c80f4c
Merge pull request #72 from YuhuiYang/hw2
Mar 3, 2015
1d5bcc2
Merge pull request #71 from joyceye04/hw2
Mar 3, 2015
49103b9
Merge pull request #67 from fresques/hw2
Mar 3, 2015
4ffc62c
Merge branch 'hw2' of https://github.com/sangheemin/data-viz into san…
Mar 3, 2015
8386729
Merge branch 'sangheemin-hw2' into hw2
Mar 3, 2015
96502bb
Merge branch 'hw2' of https://github.com/ral1331/data-viz into ral133…
Mar 3, 2015
e8a834c
Merge branch 'ral1331-hw2' into hw2
Mar 3, 2015
60cebf4
Merge pull request #63 from zhouyuzhe/hw2new
Mar 3, 2015
9ecbd7f
Merge pull request #61 from lylawatching/hw2
Mar 3, 2015
c7bf15a
Merge pull request #59 from holdind/hw2
Mar 3, 2015
2b105ee
Merge pull request #57 from kuailema1217/hw2
Mar 3, 2015
e082cd6
Merge pull request #55 from denistanwh/hw2
Mar 3, 2015
ede7384
plucked hw2's from master branch and re-directed to hw2 branch where …
Mar 3, 2015
e850217
Merge branch 'hw2' of https://github.com/Ecohen4/data-viz into hw2
Mar 3, 2015
7af9f72
all HW2 submissions to ebola folder
Mar 3, 2015
6fdd901
hw2 submissions redirected to ebola folder
Mar 3, 2015
509a11a
Yiding Lyu' HW2, resubmit
YidingLyu Mar 4, 2015
85160e7
add hw2
jeffhudson Mar 11, 2015
970db73
renamed hw2 html file
jeffhudson Mar 11, 2015
3f9cef4
Add Melissa Ragonese's HW2 Recode
melissaragonese Mar 12, 2015
4d102ba
Merge pull request #104 from melissaragonese/hw2
Mar 12, 2015
140ba8c
Merge pull request #101 from jeffhudson/hw2
Mar 12, 2015
44bec26
Merge pull request #85 from YidingLyu/hw2_2
Mar 12, 2015
c97503c
delete pesky .Rdata, keep Vaibhav hw2.
Mar 13, 2015
1a18d67
Merge branch 'vibe910-hw2' into hw2
Mar 13, 2015
1c33372
USE PROPER NAMING CONVENTION
Mar 13, 2015
6f30f1d
Merge branch 'hw2' of https://github.com/Ecohen4/data-viz into hw2
Mar 13, 2015
122c27d
fix names
Mar 13, 2015
826aa90
fix names
Mar 13, 2015
799c7d0
redirect to correct folder
Mar 13, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ Students will have the opportunity to work in small teams to create data visuali
Your assignments will be submitted as pull requests to the class repository on github! Suppose you saved changes on your own `gh-pages` branch and would like to submit a ‘clean’ pull request with only your files and the commits you want. This is pretty easy.

### Option 1: Basic way with file checkouts (losing history):
git checkout upstream/gh-pages #you will be on a ‘detached HEAD’
git checkout upstream/master #you will be on a ‘detached HEAD’
git checkout -b hw1 #checkout a new branch called 'hw1'
git checkout <branch> <folder/filename> #pluck a folder/file from another branch but stay on the current branch (in this case 'hw1').
git add <folder/filename>
git commit -m "add only the right files on new clean branch"
git push -u hw1 #push commits to a new branch called hw1.
git push -u origin hw1 #push commits to a new branch called hw1.

Your new `hw1` branch now has a copy of the folder/file(s) your plucked from elsewhere. Your working tree is still on the 'hw1' branch and you can continue to work on the files and commit+push further changes as frequently as you like.

Expand Down
Binary file removed ebola/.RData
Binary file not shown.
167 changes: 167 additions & 0 deletions ebola/2014-03-2-Dane_Holding-HW2.html

Large diffs are not rendered by default.

269 changes: 269 additions & 0 deletions ebola/2015-02-03-EthanYee-ty2247-Assignment2.html

Large diffs are not rendered by default.

201 changes: 201 additions & 0 deletions ebola/2015-02-24-DhruvNair-HW2.html

Large diffs are not rendered by default.

271 changes: 271 additions & 0 deletions ebola/2015-02-25-DenisTan-Assignment2.html

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions ebola/2015-02-28-JunheYang-hw2.html

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions ebola/2015-02-28-Yuzhe_Zhou-hw02.html

Large diffs are not rendered by default.

259 changes: 259 additions & 0 deletions ebola/2015-03-01-AliceBaird_HW2.html

Large diffs are not rendered by default.

220 changes: 220 additions & 0 deletions ebola/2015-03-01-JingYe-Assignment2.html

Large diffs are not rendered by default.

184 changes: 184 additions & 0 deletions ebola/2015-03-01-NaijiaLiu-Assignment2.html

Large diffs are not rendered by default.

140 changes: 140 additions & 0 deletions ebola/2015-03-01-RyanLakritz-HW2.html

Large diffs are not rendered by default.

209 changes: 209 additions & 0 deletions ebola/2015-03-01-YidingLyu-Assignment2.html

Large diffs are not rendered by default.

330 changes: 330 additions & 0 deletions ebola/2015-03-02-HannahFresques-HW02.html

Large diffs are not rendered by default.

168 changes: 168 additions & 0 deletions ebola/2015-03-02-Hudson-Jeffrey-HW2.html

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions ebola/2015-03-02-LinXu-hw2.html

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions ebola/2015-03-02-MelissaRagonese-HW2.html

Large diffs are not rendered by default.

170 changes: 170 additions & 0 deletions ebola/2015-03-02-Min-SangHee-HW2.html

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions ebola/2015-03-02-MinSangHee-HW2.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: "20150302-SangheeMin-HW2"
author: "Sang-Hee Min"
date: "March 2, 2015"
output: html_document
---

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r}
getwd()
setwd("~/data-viz/ebola")
getwd()
library(ggplot2)
library(scales)

##Read in data:
germs <- read.csv(file="Microbe-scope-bugs.csv", header=TRUE)

# assign descriptive column names where absent
names(germs)[1]<-"germ"

# how could you do this more carefully???
# names(germs)[10]<-"yearly.fatalities.rounded"
# names(germs)[11]<-"yearly.fatalities.raw"

# keep only data columns, exclude notes/links
notes <- germs[1, ] # save the notes?
germs <- germs[-1, ] # remove **row** of notes
# germs <- germs[, c(2, 4:7, 9:11)] # keep data **columns** only
# how could you do this more carefully??? e.g. remove the columns you intend to remove.

# how about something like this?
notes <- grep(pattern="note", x=names(germs), ignore.case=TRUE)
names(germs)[notes] # double check we got the right columns```

germs <- subset(germs, select = -notes) # apply filter.

# any more columns we want to omit?

# remove percent signs
dropPct<-function(germs, case.fatality.rate){
dropPct<-strsplit(as.character(germs[[case.fatality.rate]]), split="%")
germs[[case.fatality.rate]]<-as.numeric(dropPct)
return(germs[[case.fatality.rate]])}

# remove % signs, leaving a numeric value.
germs[["case.fatality.rate"]]<-dropPct(germs, "case.fatality.rate")

# Convert basic reproductive rate from factor to numeric
germs$average.basic.reproductive.rate <- as.numeric(as.character(germs$average.basic.reproductive.rate))

germs <- subset(germs, primary.mode.of.transmission != "")

germs <- germs[,c(1:4)]

germs <- germs[complete.cases(germs),]

plot <- ggplot(germs,aes(x=average.basic.reproductive.rate,y=case.fatality.rate,group =primary.mode.of.transmission,colour=primary.mode.of.transmission)) + geom_point(size=6)
print(plot)

plot <- ggplot(germs,aes(x=average.basic.reproductive.rate,y=case.fatality.rate,group =primary.mode.of.transmission,colour=primary.mode.of.transmission)) + geom_point(size=1)
print(plot)

plot <- ggplot(germs,aes(x=average.basic.reproductive.rate,y=case.fatality.rate,group =primary.mode.of.transmission,colour=primary.mode.of.transmission)) + geom_point(size=3)
print(plot)

germs <- subset(germs, germ != "Malaria (P. falciparum)")

plot <- ggplot(germs,aes(x=average.basic.reproductive.rate,y=case.fatality.rate,group =primary.mode.of.transmission,colour=primary.mode.of.transmission)) + geom_point(size=2)
print(plot)

plot <- plot +
scale_color_discrete(name="Primary Mode of Transmission") +
ggtitle("The Microbe-scope") +
scale_x_continuous("CONTAGIOUSNESS: average basic reproduction rate (R0), # people one person will likely infect", limits=c(0, 20), breaks=c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20), labels=c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20), expand = c(0,0)) +
scale_y_log10("DEADLINESS: case fatality rate (%)", limits=c(.01, 150), breaks=c(0.1, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200), labels=c(0.1, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200), expand=c(0,0)) +
theme_bw(base_size=12) +
geom_text(aes(label=germ, hjust = 0.15, vjust=-0.75, angle = 10), size=2)
print(plot)

#having problems with the annotation...
127 changes: 127 additions & 0 deletions ebola/2015-03-02-YiqianJin-HW2.html

Large diffs are not rendered by default.

146 changes: 146 additions & 0 deletions ebola/2015-03-02-Yuhui_Yang-HW2.html

Large diffs are not rendered by default.

127 changes: 127 additions & 0 deletions ebola/2015-03-11-MelissaRagonese-HW2-Recode.html

Large diffs are not rendered by default.

188 changes: 188 additions & 0 deletions ebola/2015-3-1-Yue_Guo-HW2.html

Large diffs are not rendered by default.

206 changes: 206 additions & 0 deletions ebola/2015-3-2-MattGhazarian-HW2.html

Large diffs are not rendered by default.

Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.