You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a member of The Carpentries Core Team and I'm submitting this issue on behalf of another member of the community. In most cases, I won't be able to follow up or provide more details other than what I'm providing below.
I've taught a portion of this lesson to some colleagues and noticed an area of improvement-more specifically on the 5th lesson 'Data Visualization with ggplot2'.
During the lesson, we introduce to the learner a basic template used for making different types of plots:
In the template above, we can see that the mapping function (mapping = x) is inside of the ggplot() function. However, in the next few examples where the histogram is used:
You can see now the aes() function is moved outside of the ggplot() function, and the mapping is removed without explanation. Then, in some other examples, the aes() mapping function is now back inside of the ggplot() function.
# boxplot plot high usage books by call number class
ggplot(data=booksHighUsage,
aes(x=call_class,y=tot_chkout))+
geom_boxplot()+
scale_y_log10()
The resounding question from my students was: Does this matter? Why is the aes() function used sometimes globally and then sometimes locally?
I think that it would be worth it to mention that sometimes the mapping function is used outside of the ggplot() function, and sometimes you don't need 'mapping ='. This is not adding much content, maybe just 1-2 minutes worth of explanation-but I think it would help a lot in avoiding confusion.
The text was updated successfully, but these errors were encountered:
I'm a member of The Carpentries Core Team and I'm submitting this issue on behalf of another member of the community. In most cases, I won't be able to follow up or provide more details other than what I'm providing below.
I've taught a portion of this lesson to some colleagues and noticed an area of improvement-more specifically on the 5th lesson 'Data Visualization with ggplot2'.
During the lesson, we introduce to the learner a basic template used for making different types of plots:
ggplot(data = <DATA>, mapping = aes(<MAPPINGS>)) + <GEOM_FUNCTION>()
In the template above, we can see that the mapping function (mapping = x) is inside of the ggplot() function. However, in the next few examples where the histogram is used:
You can see now the aes() function is moved outside of the ggplot() function, and the mapping is removed without explanation. Then, in some other examples, the aes() mapping function is now back inside of the ggplot() function.
The resounding question from my students was: Does this matter? Why is the aes() function used sometimes globally and then sometimes locally?
I think that it would be worth it to mention that sometimes the mapping function is used outside of the ggplot() function, and sometimes you don't need 'mapping ='. This is not adding much content, maybe just 1-2 minutes worth of explanation-but I think it would help a lot in avoiding confusion.
The text was updated successfully, but these errors were encountered: