Overview

You have learned alot about data wrangling! You know how to use the tidyverse to:

The goal of this homework is to solidify your data wrangling skills by working some realistic problems in the grey area between data aggregation and data reshaping.

If you internalize that there are multiple solutions to most problems, you will spend less time banging your head against the wall in data analysis. If something’s really hard, sneak up on it from a different angle.

Due anytime Tuesday October 10th 2017.

Choose your own adventure

Pick one of the data reshaping prompts and do it.

Pick a join prompt and do it.

It is fine to work with a new dataset and/or create variations on these problem themes.

General data reshaping and relationship to aggregation

Problem: You have data in one “shape” but you wish it were in another. Usually this is because the alternative shape is superior for presenting a table, making a figure, or doing aggregation and statistical analysis.

Solution: Reshape your data. For simple reshaping, gather() and spread() from tidyr will suffice. Do the thing that it possible / easier now that your data has a new shape.

Prompts:

Activity #1

Activity #2

Activity #3

Activity #4

Activity #5

Join, merge, look up

Problem: You have two data sources and you need info from both in one new data object.

Solution: Perform a join, which borrows terminology from the database world, specifically SQL.

Prompts:

Activity #1

Activity #2

You will likely need to iterate between your data prep and your joining to make your explorations comprehensive and interesting. For example, you will want a specific amount (or lack) of overlap between the two data.frames, in order to demonstrate all the different joins. You will want both the data frames to be as small as possible, while still retaining the expository value.

Activity #3

Peer Review

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