Open arsbar24 opened 7 years ago
Hi @arsbar24, Nice to meet you!
I liked your creativity in this assignment and your willingness to explore what you were interested in looking at.
All of your plots had a clear title, as well as labels for your axis. I really liked that since it makes interpreting plots much easier!
For your first task of reshaping the gapminder data by organizing countries by year and plotting one country against another, I liked your plot that shows the reference y=x diagonal line, and compared all other plots representing country pairs to the reference line. It makes it easier to spot distinct life expectancy correlations between countries. For this task I actually couldn't figure out how to reshape the data, but I see you elegantly used group_by()
and spread()
to achieve this data format. So good job!
For your second task, I liked your demonstration of the full_join()
function by adding your personal "penguins" column. It is a nice touch and, like you said, makes applying different join()
functions non-trivial. In your plot, it was useful to compare the weighted mean and loess fit on the same graph. You pointed out some subtle differences that would've been difficult to spot otherwise.
Good exploration of different types of joins. It was good that you demonstrated the utility of each type of join by stating at the top what you expected this function to do, such that there were some differences between the input and output. For your comparison between join and merge, one thing I wanted to let you know is that I noticed left_join()
preserves the order of the rows in the first data frame you supply it, whereas merge()
mixes up the rows. Maybe this didn't matter much for the dataset you were looking at since maybe the order of rows in both data frames matched up.
Anyway, overall good job!
Hi @arsbar24, here are some comments about your hw04:
Your grade will be emailed to you at a later date.
Hi Alistair,
The README for hw04 is very organized and all the goals are listed.
Progress report has included the references to what you have learnt which I think is great.
I like your reshaped data, which tells an interesting story. Also the plot shows a clear relationship between the life expectancy of the set of neighbouring countries. You have explored join functions and explained well for each sections.
The format is very organized and easy to follow.
You explored merge and match functions. I did not think of this use of match function which I think is useful eventhough I can also use filter.
The codes are straightforward and clean.
When I use the merge function with a second dataset that contains extra info for some countries and merge it to gapminder data (so some countries have extra info, some do not), merge only returns a table of countries that have the extra info. But left_join(gapminder, second_dataset) returns a table of all listed countries. so I think there is this difference between merge and left_join. If I want to make merge function to return the same table I need to add arguments: merge(gapminder, second_dataset, all.x=TRUE, all.y=FALSE) I can't say for sure but that's what I got when I explored the functions.
Overall I think it is a good homework. Check plus!