Open hannahdxz opened 6 years ago
Hello hannahdxz,
You provided a great submission and met the task requirements. One thing to note, I think you of all assignments I have thus far seen have easily the most organized and easy to navigate. You provided a table of contents and links to quickly move around through the file. Headings were clear and informative as well. Perhaps the most surprising aspect of this, is that even with all this added navigational utility there remains clarity. By contrast, on my own end when I attempt to better organize my submission, this often results in something more akin to visual clutter.
I also appreciate your attempt to make kable tables appear nicer, e.g. (e.g. bootstrap_options = c("striped", "hover", "condensed", "responsive"). I had also attempted to make my own kable table appear more pleasant, and found that when format was set to “markdown” we are really limited, and instead we need to use html or latex to really make considerable appearance improvements. You similarly set your table format to html, although since we are creating an md, some of the fruits of this labor were not visible but none the less are noted and worthy of merit.
You also include text to briefly describe what the output was to the viewer thereby ensuring they are able to follow along. Use of facet_wrap was good to, although, the resulting figure may have been slightly confusing to someone not familiar with gapminder in that the x-axis was titled “year” and y-axis “Years”.
The northern vs. southern, and area variables you added were great contributions and allowed you to explore a variety of different join functions. These included inner, left, anti and full. You also carefully tested the output as in the final section after using an anti_join you knew Asia should not be part of the resulting data set, and indeed after double checking it was not.
Dong Xinzhe | Peer Rating | Comments |
---|---|---|
Coding style | + | There were no apparent errors in the code and could be easily read.There were adequate comments to help me understand any line of code. |
Coding strategy | + | The coding strategy followed along with the requirements of the homework and included a very helpful table of contents. |
Presentation: graphs | + | The faceted graphs were visually appealing and very clear. |
Presentation: tables | + | The tables seem well presented with knitr although I cannot see the full effect of the bootstrap options. |
Achievement, mastery, cleverness, creativity | + | The homework shows complete mastery of the concepts in the class. |
Ease of access for reviewer, compliance with course conventions for submitted work | + | Once I got around the privacy settings on the repo the hw04 could be easily found. I would suppress warnings to make the rendered document easier to review with message=FALSE inside the chunks. Those messages were a bit distracting. |
Overall | + |
Hi @hannahdxz, here are some comments about your hw04:
You can get rid of the package startup messages and warnings by specifying the warning=FALSE, and message=FALSE arguments in the header of the Rmarkdown code block.
Although your way of computing the life expectancies of Canada and Gambia works, you can do this more efficiently with the following code (and then use spread to convert it to wide format):
Year_lifeexp <- gapminder %>%
filter(country %in% c(“Canada”,”Gambia”) %>%
select(year, country, lifeExp)%>%
spread(country, lifeExp)
Good use of gather to convert data into long format!
It isn’t wrong to facet your scatterplots, but I don’t think that it is necessary in this case. Both sets of points can go on the same axis (but color them by country, or use different shapes). Also, consider relabelling your Y-axis (it is fine to call it “Life Expectancy”) since it is nearly identical to the X-axis label and could be confusing without more context.
In general, you should try to knit tables with kable where possible since it makes your report neater and easier to read!
Good use and explanations of the different types of joins!
I think next time you should subset the gapminder dataset to better illustrate your points, since your new variables do not change over time, you can group the gapminder dataset by year. Also, it is okay to only use a subset of countries as well since it is impractical to show hundreds of countries in a table that is supposed to show how joins work.
Solid work overall, code is neat and easy to read, report and repository are well organized and presentable.
In order to join multiple tables, you can check out the join_all() function from plyr. However, I believe that you need to have an “id” variable that is common across all data frames for it to work.
Your grade will be emailed to you at a later date.
https://github.com/hannahdxz/STAT545-hw-Dong-Xinzhe/blob/master/hw04/hw04.md
f11abf2