Overview

Consult the general homework guidelines. You’ll be submitting this homework to the repo you submitted Homework 02 too.

Due Tuesday 2017-10-03 at midnight.

The goal is to manipulate and explore a dataset with the dplyr package, complemented by visualizations made with ggplot2.

Your homework should serve as your own personal cheatsheet in the future for ways to manipulate a dataset and produce companion figures. Give yourself the cheatsheet you deserve! Check out the sampler concept for inspiration.

Gapminder data

Work with the Gapminder excerpt. If you really want to, you can explore a different dataset but get permission from Jenny. Self-assess the suitability of your dataset by reading this issue.

Your mission, high-level

Pick at least three of the tasks below and attack each with a table and figure.

Make observations about what your tables/figures show and about the process.

If you want to do something comparable but different, i.e. swap one quantitative variable for another, be my guest! If you are feeling inspired and curious, then we’re doing this right. Go for it.

Relax about the following things:

```{r results = 'asis'}
knitr::kable(my_df)
```

Task menu

Get the maximum and minimum of GDP per capita for all continents.

Look at the spread of GDP per capita within the continents.

Compute a trimmed mean of life expectancy for different years. Or a weighted mean, weighting by population. Just try something other than the plain vanilla mean.

How is life expectancy changing over time on different continents?

Report the absolute and/or relative abundance of countries with low life expectancy over time by continent: Compute some measure of worldwide life expectancy – you decide – a mean or median or some other quantile or perhaps your current age. Then determine how many countries on each continent have a life expectancy less than this benchmark, for each year.

Find countries with interesting stories. Open-ended and, therefore, hard. Promising but unsuccessful attempts are encouraged. This will generate interesting questions to follow up on in class.

Make up your own! Between the dplyr coverage in class and the list above, I think you get the idea.

Companion graphs

For each table, make sure to include a relevant figure.

Your figure does not have to depict every last number from the data aggregation result. Use your judgement. It just needs to complement the table, add context, and allow for some sanity checking both ways.

Notice which figures are easy/hard to make, which data formats make better inputs for plotting functions vs. for human-friendly tables.

But I want to do more!

Layout stretch goal: get table and figure side-by-side. This gist might get you started.

Table stretch goal: there are some really nice fancy table helper packages. This tweet from @polesasunder will point you toward some R packages you may want to check out (pander, xtable, stargazer).

Report your process

You’re encouraged to reflect on what was hard/easy, problems you solved, helpful tutorials you read, etc. Give credit to your sources, whether it’s a blog post, a fellow student, an online tutorial, etc.

Submit the assignment

Remember the github repo you submitted all your Homework 02 work to? The one called stat545-hw-lastname-firstname? That’s where you’ll be submitting Homework 03, too.

As before, make a new issue and call it "Homework 03 is ready for grading".

This time, you do not need to tag any of the teaching team, nor add us as collaborators! By this point, we already have access to your repo and know where it is.

Rubric

Start using our general rubric for specifics to evaluate! The form will require you to do so!

Check minus: Didn’t tackle at least 3 tasks. Or didn’t make companion graphs. Didn’t interpret anything but left it all to the “reader”. Or more than one technical problem that is relatively easy to fix. It’s hard to find the report in this crazy repo.

Check: Hits all the elements. No obvious mistakes. Pleasant to read. No heroic detective work required. Solid.

Check plus: Exceeded the requirements in number of tasks. Or developed novel tasks that were indeed interesting and “worked”. Impressive use of dplyr and/or ggplot2. Impeccable organization of repo and report. You learned something new from reviewing their work and you’re eager to incorporate it into your work.

Peer Review

The peer review is ready and is due October 9, 2017! Here’s what you’ll need to do:

  1. Find your github username in the table below. If it’s not there, let Giulio know! Slack me @giulio.
  2. Add the people who will be giving you a review as collaborators to the repo containing your homework submission.
  3. Give a review of this homework for the two people you’ve been assigned to. There should be an issue in their repo titled something like hw0x ready for grading – put your review in there as a comment.
    • If there is no such issue, make one! (in their repo)
    • Please don’t mix up your reviewers and reviewees!

Check out the guidelines for giving a peer review.

Your_github Instructions
abishekarun Please add dorawyy and ZimingY as collaborators to your repo containing hw03. Please review the hw03 submission of cindyhurtado and qiaoyuet.
acavalla Please add SonjaS1 and arsbar24 as collaborators to your repo containing hw03. Please review the hw03 submission of rdwyer2 and rishadhabib.
aiod01 Please add heathersummers and vibudh2209 as collaborators to your repo containing hw03. Please review the hw03 submission of arthursunbao and mylinhthibodeau.
Alexander-Morin Please add sdhanani and zxkathy as collaborators to your repo containing hw03. Please review the hw03 submission of nicolehawe and angmelanie.
alexrod61 Please add yanchaoluo and NSKrstic as collaborators to your repo containing hw03. Please review the hw03 submission of Mathnstein and xinmiaow.
angmelanie Please add Alexander-Morin and nicolehawe as collaborators to your repo containing hw03. Please review the hw03 submission of gbraich and nbendriem.
arsbar24 Please add navysealtf9k and SonjaS1 as collaborators to your repo containing hw03. Please review the hw03 submission of acavalla and rdwyer2.
arthursunbao Please add vibudh2209 and aiod01 as collaborators to your repo containing hw03. Please review the hw03 submission of mylinhthibodeau and Tangjiahui26.
auduman Please add Mathnstein and xinmiaow as collaborators to your repo containing hw03. Please review the hw03 submission of farihakhan and susannaelsie.
bcahn7 Please add mlawre01 and marbazua as collaborators to your repo containing hw03. Please review the hw03 submission of wswade2 and yanchaoluo.
burkeprw Please add santiagodr and ilgan as collaborators to your repo containing hw03. Please review the hw03 submission of cheungamanda and swynes.
CassKon Please add lucymei and jmurthy12 as collaborators to your repo containing hw03. Please review the hw03 submission of margotgunning and emilymistick.
ChadFibke Please add shadowforti and juansbr7 as collaborators to your repo containing hw03. Please review the hw03 submission of vmichalowski and yeonukkim.
cheungamanda Please add ilgan and burkeprw as collaborators to your repo containing hw03. Please review the hw03 submission of swynes and ssheikho.
cindyhurtado Please add ZimingY and abishekarun as collaborators to your repo containing hw03. Please review the hw03 submission of qiaoyuet and Maria815.
danaj191 Please add julianheavyside and OliviaTabares as collaborators to your repo containing hw03. Please review the hw03 submission of mlawre01 and marbazua.
diermc Please add ssheikho and peterwhitman as collaborators to your repo containing hw03. Please review the hw03 submission of jenncscampbell and dorawyy.
dorawyy Please add diermc and jenncscampbell as collaborators to your repo containing hw03. Please review the hw03 submission of ZimingY and abishekarun.
emilymistick Please add CassKon and margotgunning as collaborators to your repo containing hw03. Please review the hw03 submission of teilhard1976 and vanflad.
estennw Please add winnietse1018 and hannahdxz as collaborators to your repo containing hw03. Please review the hw03 submission of suminwei2772 and wenzhengzzz.
farihakhan Please add xinmiaow and auduman as collaborators to your repo containing hw03. Please review the hw03 submission of susannaelsie and heathersummers.
gbraich Please add nicolehawe and angmelanie as collaborators to your repo containing hw03. Please review the hw03 submission of nbendriem and oktokat.
hannahdxz Please add vanflad and winnietse1018 as collaborators to your repo containing hw03. Please review the hw03 submission of estennw and suminwei2772.
HScheiber Please add hsmohammed and mattsada as collaborators to your repo containing hw03. Please review the hw03 submission of navysealtf9k and SonjaS1.
hsmohammed Please add Kozp and k3vzhu as collaborators to your repo containing hw03. Please review the hw03 submission of mattsada and HScheiber.
heathersummers Please add farihakhan and susannaelsie as collaborators to your repo containing hw03. Please review the hw03 submission of vibudh2209 and aiod01.
ilgan Please add rishadhabib and santiagodr as collaborators to your repo containing hw03. Please review the hw03 submission of burkeprw and cheungamanda.
jenncscampbell Please add peterwhitman and diermc as collaborators to your repo containing hw03. Please review the hw03 submission of dorawyy and ZimingY.
Jennica416 Please add xinyaofan and KateJohnson as collaborators to your repo containing hw03. Please review the hw03 submission of sepkamal and yidie.
jmurthy12 Please add yuanjisun and lucymei as collaborators to your repo containing hw03. Please review the hw03 submission of CassKon and margotgunning.
juansbr7 Please add yidie and shadowforti as collaborators to your repo containing hw03. Please review the hw03 submission of ChadFibke and vmichalowski.
julianheavyside Please add nbendriem and oktokat as collaborators to your repo containing hw03. Please review the hw03 submission of OliviaTabares and danaj191.
k3vzhu Please add rainerlempert and Kozp as collaborators to your repo containing hw03. Please review the hw03 submission of hsmohammed and mattsada.
KateJohnson Please add wenzhengzzz and xinyaofan as collaborators to your repo containing hw03. Please review the hw03 submission of Jennica416 and sepkamal.
Kozp Please add menglinzhou and rainerlempert as collaborators to your repo containing hw03. Please review the hw03 submission of k3vzhu and hsmohammed.
lucymei Please add Maria815 and yuanjisun as collaborators to your repo containing hw03. Please review the hw03 submission of jmurthy12 and CassKon.
marbazua Please add danaj191 and mlawre01 as collaborators to your repo containing hw03. Please review the hw03 submission of bcahn7 and wswade2.
margotgunning Please add jmurthy12 and CassKon as collaborators to your repo containing hw03. Please review the hw03 submission of emilymistick and teilhard1976.
Maria815 Please add cindyhurtado and qiaoyuet as collaborators to your repo containing hw03. Please review the hw03 submission of yuanjisun and lucymei.
Mathnstein Please add NSKrstic and alexrod61 as collaborators to your repo containing hw03. Please review the hw03 submission of xinmiaow and auduman.
mattsada Please add k3vzhu and hsmohammed as collaborators to your repo containing hw03. Please review the hw03 submission of HScheiber and navysealtf9k.
menglinzhou Please add mylinhthibodeau and Tangjiahui26 as collaborators to your repo containing hw03. Please review the hw03 submission of rainerlempert and Kozp.
mlawre01 Please add OliviaTabares and danaj191 as collaborators to your repo containing hw03. Please review the hw03 submission of marbazua and bcahn7.
mylinhthibodeau Please add aiod01 and arthursunbao as collaborators to your repo containing hw03. Please review the hw03 submission of Tangjiahui26 and menglinzhou.
navysealtf9k Please add mattsada and HScheiber as collaborators to your repo containing hw03. Please review the hw03 submission of SonjaS1 and arsbar24.
nbendriem Please add angmelanie and gbraich as collaborators to your repo containing hw03. Please review the hw03 submission of oktokat and julianheavyside.
nicolehawe Please add zxkathy and Alexander-Morin as collaborators to your repo containing hw03. Please review the hw03 submission of angmelanie and gbraich.
NSKrstic Please add wswade2 and yanchaoluo as collaborators to your repo containing hw03. Please review the hw03 submission of alexrod61 and Mathnstein.
oktokat Please add gbraich and nbendriem as collaborators to your repo containing hw03. Please review the hw03 submission of julianheavyside and OliviaTabares.
OliviaTabares Please add oktokat and julianheavyside as collaborators to your repo containing hw03. Please review the hw03 submission of danaj191 and mlawre01.
peterwhitman Please add swynes and ssheikho as collaborators to your repo containing hw03. Please review the hw03 submission of diermc and jenncscampbell.
qiaoyuet Please add abishekarun and cindyhurtado as collaborators to your repo containing hw03. Please review the hw03 submission of Maria815 and yuanjisun.
rainerlempert Please add Tangjiahui26 and menglinzhou as collaborators to your repo containing hw03. Please review the hw03 submission of Kozp and k3vzhu.
rdwyer2 Please add arsbar24 and acavalla as collaborators to your repo containing hw03. Please review the hw03 submission of rishadhabib and santiagodr.
rishadhabib Please add acavalla and rdwyer2 as collaborators to your repo containing hw03. Please review the hw03 submission of santiagodr and ilgan.
santiagodr Please add rdwyer2 and rishadhabib as collaborators to your repo containing hw03. Please review the hw03 submission of ilgan and burkeprw.
sdhanani Please add yeonukkim and Shirlett as collaborators to your repo containing hw03. Please review the hw03 submission of zxkathy and Alexander-Morin.
sepkamal Please add KateJohnson and Jennica416 as collaborators to your repo containing hw03. Please review the hw03 submission of yidie and shadowforti.
shadowforti Please add sepkamal and yidie as collaborators to your repo containing hw03. Please review the hw03 submission of juansbr7 and ChadFibke.
Shirlett Please add vmichalowski and yeonukkim as collaborators to your repo containing hw03. Please review the hw03 submission of sdhanani and zxkathy.
SonjaS1 Please add HScheiber and navysealtf9k as collaborators to your repo containing hw03. Please review the hw03 submission of arsbar24 and acavalla.
ssheikho Please add cheungamanda and swynes as collaborators to your repo containing hw03. Please review the hw03 submission of peterwhitman and diermc.
suminwei2772 Please add hannahdxz and estennw as collaborators to your repo containing hw03. Please review the hw03 submission of wenzhengzzz and xinyaofan.
susannaelsie Please add auduman and farihakhan as collaborators to your repo containing hw03. Please review the hw03 submission of heathersummers and vibudh2209.
swynes Please add burkeprw and cheungamanda as collaborators to your repo containing hw03. Please review the hw03 submission of ssheikho and peterwhitman.
Tangjiahui26 Please add arthursunbao and mylinhthibodeau as collaborators to your repo containing hw03. Please review the hw03 submission of menglinzhou and rainerlempert.
teilhard1976 Please add margotgunning and emilymistick as collaborators to your repo containing hw03. Please review the hw03 submission of vanflad and winnietse1018.
vanflad Please add emilymistick and teilhard1976 as collaborators to your repo containing hw03. Please review the hw03 submission of winnietse1018 and hannahdxz.
vibudh2209 Please add susannaelsie and heathersummers as collaborators to your repo containing hw03. Please review the hw03 submission of aiod01 and arthursunbao.
vmichalowski Please add juansbr7 and ChadFibke as collaborators to your repo containing hw03. Please review the hw03 submission of yeonukkim and Shirlett.
wenzhengzzz Please add estennw and suminwei2772 as collaborators to your repo containing hw03. Please review the hw03 submission of xinyaofan and KateJohnson.
winnietse1018 Please add teilhard1976 and vanflad as collaborators to your repo containing hw03. Please review the hw03 submission of hannahdxz and estennw.
wswade2 Please add marbazua and bcahn7 as collaborators to your repo containing hw03. Please review the hw03 submission of yanchaoluo and NSKrstic.
xinmiaow Please add alexrod61 and Mathnstein as collaborators to your repo containing hw03. Please review the hw03 submission of auduman and farihakhan.
xinyaofan Please add suminwei2772 and wenzhengzzz as collaborators to your repo containing hw03. Please review the hw03 submission of KateJohnson and Jennica416.
yanchaoluo Please add bcahn7 and wswade2 as collaborators to your repo containing hw03. Please review the hw03 submission of NSKrstic and alexrod61.
yeonukkim Please add ChadFibke and vmichalowski as collaborators to your repo containing hw03. Please review the hw03 submission of Shirlett and sdhanani.
yidie Please add Jennica416 and sepkamal as collaborators to your repo containing hw03. Please review the hw03 submission of shadowforti and juansbr7.
yuanjisun Please add qiaoyuet and Maria815 as collaborators to your repo containing hw03. Please review the hw03 submission of lucymei and jmurthy12.
ZimingY Please add jenncscampbell and dorawyy as collaborators to your repo containing hw03. Please review the hw03 submission of abishekarun and cindyhurtado.
zxkathy Please add Shirlett and sdhanani as collaborators to your repo containing hw03. Please review the hw03 submission of Alexander-Morin and nicolehawe.