New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding basic ggplot syntax at the start of the lesson #87

Open
rodriguezmDNA opened this Issue Jun 27, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@rodriguezmDNA

rodriguezmDNA commented Jun 27, 2018

Comparing the data visualization section between the R-ecology workshop (http://www.datacarpentry.org/R-ecology-lesson/04-visualization-ggplot2.html) and this one (https://swcarpentry.github.io/r-novice-gapminder-es/08-plot-ggplot2/index.html) I feel this lesson could benefit by starting on the structure/syntax of creating a plot plus the idea behind the grammar of graphics.

For example, the ecology lesson provides the example of the syntax:

ggplot(data = <DATA>, mapping = aes(<MAPPINGS>)) + <GEOM_FUNCTION>()

While the spanish lesson jumps directly into the creation of a plot

library("ggplot2") ggplot(data = gapminder, aes(x = gdpPercap, y = lifeExp)) + geom_point()

Furthermore, I feel that it'd be beneficial to state that one of the benefits of ggplots is that we are able to add layers (ie, different "geometries" with geom_*) and thus create more complex plots in a more structured manner.

@raynamharris

This comment has been minimized.

Contributor

raynamharris commented Jul 6, 2018

Thanks @rodriguezmDNA. This is a great suggestion! The SWC version doesn't explain the function well before jumping in. Would you be able to translate the beginning section of the DC lesson and replace the beginning of the SWC lesson with this new text?

Note: I like loading only ggplot2 rather than tidyverse and the first real code block should reference the gapminder data not the survey data :)

@raynamharris

This comment has been minimized.

Contributor

raynamharris commented Jul 6, 2018

Note: if you take this on, please edit the episdoes_rmd/08-plot-ggplot2.Rmd file, not the episdoes/08-plot-ggplot2.md file. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment