Overview

Consult the general homework guidelines.

Due anytime Wednesday 2017-11-08.

Pick (at least) two of the six (numbered) topics below and do one of the exercise prompts listed, or something comparable using your dataset of choice.

1. Character data

Read and work the exercises in the Strings chapter or R for Data Science.

2. Writing functions

Pick one:

3. Work with the candy data

In 2015, we explored a dataset based on a Halloween candy survey (but it included many other odd and interesting questions). Work on something from this homework from 2015. It is good practice on basic data ingest, exploration, character data cleanup, and wrangling.

4. Work with the singer data

The singer_location dataframe in the singer package contains geographical information stored in two different formats: 1. as a (dirty!) variable named city; 2. as a latitude / longitude pair (stored in latitude, longitude respectively). The function revgeocode from the ggmap library allows you to retrieve some information for a pair (vector) of longitude, latitude (warning: notice the order in which you need to pass lat and long). Read its manual page.

  1. Use purrr to map latitude and longitude into human readable information on the band’s origin places. Notice that revgeocode(... , output = "more") outputs a dataframe, while revgeocode(... , output = "address") returns a string: you have the option of dealing with nested dataframes.
    You will need to pay attention to two things:
    • Not all of the track have a latitude and longitude: what can we do with the missing information? (filtering, …)
    • Not all of the time we make a research through revgeocode() we get a result. What can we do to avoid those errors to bite us? (look at possibly() in purrr…)
  2. Try to check wether the place in city corresponds to the information you retrieved.

  3. If you still have time, you can go visual: give a look to the library leaflet and plot some information about the bands. A snippet of code is provided below.

    singer_locations %>%  
      leaflet()  %>%   
      addTiles() %>%  
      addCircles(popup = ~artist_name)

5. Work with a list

Work through and write up a lesson from the purrr tutorial:

6. Work with a nested data frame

Create a nested data frame and map a function over the list column holding the nested data. Use list extraction or other functions to pull interesting information out of these results and work your way back to a simple data frame you can visualize and explore.

Here’s a fully developed prompt for Gapminder:

Inspiration for the modelling and downstream inspiration

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

Follow instructions on How to submit homework

Rubric

Check minus: One or more elements are missing or sketchy. Missed opportunities to complement code and numbers with a figure and interpretation. 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. Well done! This should be the most typical mark!

Check plus: Exceeded the requirements in number of dimensions. Developed novel tasks that were indeed interesting and “worked”. Impressive use of R – maybe involving functions, packages or workflows that weren’t given in class materials. 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 November 13, 2017 (before midnight)! 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!

** If you were assigned to a MISSING repo, please contact me @gvdr **

** If you did not yet communicate me your github handle, please do **

Check out the guidelines for giving a peer review.

Your_github Instructions
abishekarun Please add ZimingY and zxkathy as collaborators to your repo containing hw07. Please review the hw07 submission of xinmiaow and MISSING.
AnhKhoaVo Please add yanchaoluo and hsmohammed as collaborators to your repo containing hw07. Please review the hw07 submission of heathersummers and Mathnstein.
arsbar24 Please add gbraich and menglinzhou as collaborators to your repo containing hw07. Please review the hw07 submission of SonjaS1 and KateJohnson.
arthursunbao Please add juansbr7 and rishadhabib as collaborators to your repo containing hw07. Please review the hw07 submission of yanchaoluo and hsmohammed.
bcahn7 Please add peterwhitman and yidie as collaborators to your repo containing hw07. Please review the hw07 submission of Shirlett and Kozp.
CassKon Please add MISSING and swynes as collaborators to your repo containing hw07. Please review the hw07 submission of yeonukkim and vibudh2209.
cheungamanda Please add wenzhengzzz and sepkamal as collaborators to your repo containing hw07. Please review the hw07 submission of santiagodr and margotgunning.
dorawyy Please add vanflad and mattsada as collaborators to your repo containing hw07. Please review the hw07 submission of peterwhitman and yidie.
emilymistick Please add SonjaS1 and KateJohnson as collaborators to your repo containing hw07. Please review the hw07 submission of juansbr7 and rishadhabib.
emwest Please add Shirlett and Kozp as collaborators to your repo containing hw07. Please review the hw07 submission of xinyaofan and hannahdxz.
farihakhan Please add heathersummers and Mathnstein as collaborators to your repo containing hw07. Please review the hw07 submission of ilgan and MISSING.
gbraich Please add yuanjisun and suminwei2772 as collaborators to your repo containing hw07. Please review the hw07 submission of menglinzhou and arsbar24.
hannahdxz Please add emwest and xinyaofan as collaborators to your repo containing hw07. Please review the hw07 submission of marbazua and HScheiber.
heathersummers Please add hsmohammed and AnhKhoaVo as collaborators to your repo containing hw07. Please review the hw07 submission of Mathnstein and farihakhan.
HScheiber Please add hannahdxz and marbazua as collaborators to your repo containing hw07. Please review the hw07 submission of jmurthy12 and vmichalowski.
hsmohammed Please add arthursunbao and yanchaoluo as collaborators to your repo containing hw07. Please review the hw07 submission of AnhKhoaVo and heathersummers.
ilgan Please add Mathnstein and farihakhan as collaborators to your repo containing hw07. Please review the hw07 submission of MISSING and rainerlempert.
jmurthy12 Please add marbazua and HScheiber as collaborators to your repo containing hw07. Please review the hw07 submission of vmichalowski and wswade2.
juansbr7 Please add KateJohnson and emilymistick as collaborators to your repo containing hw07. Please review the hw07 submission of rishadhabib and arthursunbao.
KateJohnson Please add arsbar24 and SonjaS1 as collaborators to your repo containing hw07. Please review the hw07 submission of emilymistick and juansbr7.
Kozp Please add bcahn7 and Shirlett as collaborators to your repo containing hw07. Please review the hw07 submission of emwest and xinyaofan.
marbazua Please add xinyaofan and hannahdxz as collaborators to your repo containing hw07. Please review the hw07 submission of HScheiber and jmurthy12.
margotgunning Please add cheungamanda and santiagodr as collaborators to your repo containing hw07. Please review the hw07 submission of yuanjisun and suminwei2772.
Mathnstein Please add AnhKhoaVo and heathersummers as collaborators to your repo containing hw07. Please review the hw07 submission of farihakhan and ilgan.
mattsada Please add mlawre01 and vanflad as collaborators to your repo containing hw07. Please review the hw07 submission of dorawyy and peterwhitman.
menglinzhou Please add suminwei2772 and gbraich as collaborators to your repo containing hw07. Please review the hw07 submission of arsbar24 and SonjaS1.
Benjamin Hives Please add abishekarun and xinmiaow as collaborators to your repo containing hw07. Please review the hw07 submission of swynes and CassKon.
Cathy Tang Please add farihakhan and ilgan as collaborators to your repo containing hw07. Please review the hw07 submission of rainerlempert and mlawre01.
mlawre01 Please add MISSING and rainerlempert as collaborators to your repo containing hw07. Please review the hw07 submission of vanflad and mattsada.
mylinhthibodeau Please add vibudh2209 and Tangjiahui26 as collaborators to your repo containing hw07. Please review the hw07 submission of wenzhengzzz and sepkamal.
peterwhitman Please add mattsada and dorawyy as collaborators to your repo containing hw07. Please review the hw07 submission of yidie and bcahn7.
rainerlempert Please add ilgan and MISSING as collaborators to your repo containing hw07. Please review the hw07 submission of mlawre01 and vanflad.
rishadhabib Please add emilymistick and juansbr7 as collaborators to your repo containing hw07. Please review the hw07 submission of arthursunbao and yanchaoluo.
santiagodr Please add sepkamal and cheungamanda as collaborators to your repo containing hw07. Please review the hw07 submission of margotgunning and yuanjisun.
sepkamal Please add mylinhthibodeau and wenzhengzzz as collaborators to your repo containing hw07. Please review the hw07 submission of cheungamanda and santiagodr.
Shirlett Please add yidie and bcahn7 as collaborators to your repo containing hw07. Please review the hw07 submission of Kozp and emwest.
SonjaS1 Please add menglinzhou and arsbar24 as collaborators to your repo containing hw07. Please review the hw07 submission of KateJohnson and emilymistick.
suminwei2772 Please add margotgunning and yuanjisun as collaborators to your repo containing hw07. Please review the hw07 submission of gbraich and menglinzhou.
swynes Please add xinmiaow and MISSING as collaborators to your repo containing hw07. Please review the hw07 submission of CassKon and yeonukkim.
Tangjiahui26 Please add yeonukkim and vibudh2209 as collaborators to your repo containing hw07. Please review the hw07 submission of mylinhthibodeau and wenzhengzzz.
vanflad Please add rainerlempert and mlawre01 as collaborators to your repo containing hw07. Please review the hw07 submission of mattsada and dorawyy.
vibudh2209 Please add CassKon and yeonukkim as collaborators to your repo containing hw07. Please review the hw07 submission of Tangjiahui26 and mylinhthibodeau.
vmichalowski Please add HScheiber and jmurthy12 as collaborators to your repo containing hw07. Please review the hw07 submission of wswade2 and ZimingY.
wenzhengzzz Please add Tangjiahui26 and mylinhthibodeau as collaborators to your repo containing hw07. Please review the hw07 submission of sepkamal and cheungamanda.
wswade2 Please add jmurthy12 and vmichalowski as collaborators to your repo containing hw07. Please review the hw07 submission of ZimingY and zxkathy.
xinmiaow Please add zxkathy and abishekarun as collaborators to your repo containing hw07. Please review the hw07 submission of MISSING and swynes.
xinyaofan Please add Kozp and emwest as collaborators to your repo containing hw07. Please review the hw07 submission of hannahdxz and marbazua.
yanchaoluo Please add rishadhabib and arthursunbao as collaborators to your repo containing hw07. Please review the hw07 submission of hsmohammed and AnhKhoaVo.
yeonukkim Please add swynes and CassKon as collaborators to your repo containing hw07. Please review the hw07 submission of vibudh2209 and Tangjiahui26.
yidie Please add dorawyy and peterwhitman as collaborators to your repo containing hw07. Please review the hw07 submission of bcahn7 and Shirlett.
yuanjisun Please add santiagodr and margotgunning as collaborators to your repo containing hw07. Please review the hw07 submission of suminwei2772 and gbraich.
ZimingY Please add vmichalowski and wswade2 as collaborators to your repo containing hw07. Please review the hw07 submission of zxkathy and abishekarun.
zxkathy Please add wswade2 and ZimingY as collaborators to your repo containing hw07. Please review the hw07 submission of abishekarun and xinmiaow.