general rules
- homework is due Mon at 5 PM (the week after it is assigned).
- you should submit your homework by pushing it to your individual GitHub repository and sending us an e-mail telling us it’s done (please put “stat744 HW 1” [for example] in the title of your e-mail)
- appropriate collaboration: it’s fine to discuss ideas with your colleagues and get help overcoming technical difficulties, but please write your code/prepare your assignments separately.
- code rules:
- never put
setwd()
at the head of your script (unless commented out); always use relative rather than absolute paths (read_csv("data/myfile.csv")
is OK, read_csv("myfile.csv")
is OK, but read_csv("C:/Joe's Files/stat744/myfile.csv")
is never OK
- code must run correctly in a fresh R session; load all packages, make sure all data is accessible …
- do not include
install.packages()
in your code
- use
library
instead of require
(unless you have a specific reason to use require
HW 1
- create a GitHub repository called
stat744
- add Jonathan Dushoff (
@dushoff
) and Ben Bolker (@bbolker
) as collaborators (Settings
> Collaborators
(left margin) > Add collaborator
)
- find some data.
- a small handful of data sources:
- make 3 ggplots, with good, tidy code and say something about them (use what you’ve learned from Rauser).
- Put the code in the main repository directory
- use either
hw1.R
(with comments as comments or in hw1.txt
) or else hw1.rmd
- This file can use data or code from other directories in the repo (with relative pathnames) if you like
- put the output graphs (or rmarkdown output) in a directory called
HW1
HW 2
- take a look at Jia You’s online graphic about vaccine here
- to get the data, you can use
readr::read_csv("https://bbolker.github.io/stat744/data/vaccine_data_online.csv")
or download the data directly from here
- write a short statement (a few sentences) that explains what question you think the graphic is trying to answer, or what pattern it’s trying to display
- based on these data, create 2 ggplots that display the data in a different way from the original; use the 2 plots to illustrate tradeoffs between different graphical principles. (If you’re feeling truly uncreative, one of your plots can replicate the original graphical design.) You do not need to worry about the dynamic-graphics aspect or the historical events shown in the original display
- explain (in a few sentences) why your graph or graphs answer the question better than the original graph
- Put the code in the main repository directory
- use either
hw2.R
(with comments as comments or in hw2.txt
) or else hw2.rmd
for the code
- put the output graphs (or rmarkdown output) in a directory called
HW2
- extra credit: see if you can find information about vaccine coverage over time (i.e., estimates of fraction vaccinated in the US per year) - not just the date of licensing - and incorporate it in your results (we have no idea if this is possible)
HW 3
- The second half of the course will be primarily about student presentations. Read the suggested topics on the schedule page, think about topics you might want to add, and send us both an email (no need to push to the repository this time), listing two or three topics you would be willing to work on with a partner, and say a little bit about what aspects you feel you might want to address (or you can say more than a little if you like, particularly if you are suggesting a new topic). Questions about new or existing topics are welcome by email, or if there is time in class.
HW 4
Find a table (preferably a complicated one) and turn it into one, two or three graphs. Explain what features of the data you are trying to draw attention to, and what story you think your figures tell (or fail to tell).
Submit your homework as either an R Markdown file (hw4.rmd
) or a text file (hw4.txt
) and an R file (hw4.R
). These should be in your main repo directory. You should put PDF files in a directory called HW4
.
A possible table to use would be Table 3 of McCallum et al. (2017), or a simpler, earlier version of the same table (you should look at the paper for reference if you use this one). For your convenience, we have also posted a data file that gives the correspondences between drug abbreviations and full names as well as drug categories here.
Presentations
For your presentation week, you should plan a lecture on Monday, and an activity for Tuesday
If you have two group members, you should make a plan so that you’re both involved in presenting
The first period on Tuesday should involve some amount of interaction: leaders can supervise individual work, or lead the class through a practical example. For the second period, people should be working alone, with help from the leaders and Bolker (also Dushoff, on the weeks when he’s able to keep up).
On Tuesday, leaders should outline a brief assignment that individuals can complete to practice with something that you’ve taught them. For this section of the course, assignments will be due the following Monday afternoon. It is OK if people can complete (or mostly complete) the assignment on Tuesday, or the assignment could be a bit longer.
Don’t try to say or do too much in any of your three sections.
Seek help from the profs and others when you feel you need to
- The week before your presentation.
- Meet with the profs on Thursday morning to discuss your plan
- Send instructions to the class about packages or software they need to install.
- This doesn’t have to be everything you will show them, but should be everything they need for activity and assignment.
- Be aware that people may have different operating systems; do as much as you can to help them avoid headaches
Slides
- Your slides should be posted in pdf to a github repo (either belonging to a team member, or a new one that you make and share with us)
- If you want to keep your slides private, you should post to a private repo.
- If you are willing for your slides to be public, you should avoid using copyrighted materials. In this case, we may copy your slides to the main repo for convenience.
- Let the profs know if you would like help making your slides in Rmarkdown
references
McCallum, Erin S., Sherry N. N. Du, Maryam Vaseghi-Shanjani, Jasmine A. Choi, Theresa R. Warriner, Tamanna Sultana, Graham R. Scott, and Sigal Balshine. 2017. “In Situ Exposure to Wastewater Effluent Reduces Survival but Has Little Effect on the Behaviour or Physiology of an Invasive Great Lakes Fish.” Aquatic Toxicology 184 (March): 37–48. doi:10.1016/j.aquatox.2016.12.017.