Consult the general homework guidelines.
Due sometime Tuesday 2016-10-04.
The goal is to manipulate and explore a dataset with the dplyr package, complemented by visualizations made with ggplot2.
Remember the sampler concept. 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!
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.
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:
knitr::kable() function. Assuming my_df is a data.frame, here’s an R chunk that should print it as a decent-looking table:```{r results = 'asis'}
knitr::kable(my_df)
```
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.
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).
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.
Follow instructions on How to submit homework
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.