datacarpentry / r-intro-geospatial

Introduction to R for Geospatial Data
https://datacarpentry.org/r-intro-geospatial/
Other
47 stars 72 forks source link

Creating publication-quality graphics: error for the last plot(s) #39

Closed gklarenberg closed 6 years ago

gklarenberg commented 6 years ago

FYI I reviewed/tested this lesson as part of my instructor check-out, but plan to do this for a few more in the Geospatial curriculum.

In the lesson "Creating publication-quality graphics", there is an error generating the last plot, section "Modifying text". The data being called, az.countries does not exist. I have gone through the lessons before this part, but cannot find it anywhere.

I have changed this section (and submitted a pull request, #38) so it reflects the plot that was made in the section before. This required also making some changes in the accompanying text, because a) making the x-axis blank does not make any sense for this plot; so I added font size changes so theme is still in the code - I added to the text that with these commands you can change family, face, color and size. b) the axis tick labels should be changed from 1e+04 to 10,000 etc. I am not excited that this has to be done using labels = scales::comma as just labels = comma does not seem to work (anymore). I'm not sure why. Is this too confusing?

This also takes the facet_wrap() component out - which in my personal opinion is a good thing... However if facet_wrap() needs to stay in, it should be changed to continent or year as country makes no sense for this data. It creates a ridiculous number of plots that you can't see anything on. I am not crazy about the plots that are generated though (if size of the points and smoother are kept the same). So in this current pull request, facet_wrap() has been taken out

Also in this section: the mention of fill comes out of the blue. I added a line to explain it a little (this is also not in the visualization part in the Ecology curriculum btw).

Lastly, the plot for the final challenge (number 5) does not work out. I'm quite sure I have the correct data for testing this, because the I do get the exact same plot for challenge 4b. I have attached the plot that is generated.

NOTE: the code for the new plot works fine when I run the chunk, and the plot for Challenge 5 indeed doesn't work out - as described above. However when I knit the .Rmd, the html shows a completely different plot with facets for the new plot, and it does generate the correct output for the density plots...! I'm confused!

density_plot

jsta commented 6 years ago

@gklarenberg I see az.countries being created in episode 8 but you are right this is out of place in episode 6.

ErinBecker commented 6 years ago

@gklarenberg - this is an excellent (and very well documented) contribution. Unfortunately, for reasons explained in https://github.com/datacarpentry/r-intro-geospatial/pull/38, these changes won't be incorporated into the lesson. That section of the lesson was cut entirely. I hope that you can continue to contribute. Your perspective and attention to detail are highly appreciated!