Open jebyrnes opened 5 years ago
We just ran this workshop and found that learners really liked plotRGB because it was faster and took less code to get a simple interactive plot. The wait times for coding up multiple line sin ggplot and for the plots to complete was, I think, a barrier to getting to cover all the material. I propose that we should use the plotRGB
and plot
functions for most of the examples in this lesson, while still showing the folks if they want to use ggplot to make tidy graphics.
This a challenge we have to deal with when trying to cover both vector and raster material. My personal preference is to keep all plotting in ggplot
so we're not switching tools halfway through. Here is a link to an extensive thread where we discussed using ggplot
over base plotting: https://github.com/datacarpentry/r-raster-vector-geospatial/issues/133
Thanks for the info @jsta. I confess that I'm not an R user in my day to day so I'd appreciate input on what plotting tools folks use most frequently with rasters. When I'm using python as my GIS for exploratory analysis, mostly I'm using single calls to functions akin to plot
and plotRGB
, then using something like ggplot
at the end of the exploratory analysis stage to make a presentable plot that could go on a poster, paper, etc.
One way to not switch tools halfway through would be to start of by teaching with plot
and plotRGB
, then in the Publication quality graphics section, show how to make prettier plots (that require more code) using ggplot. It looks like quite a few folks in that thread have made use of plot
and plotRGB
from raster
or rastervis
and noted its advantages. Since the R for Geospatial lesson already covers ggplot and this lesson has so much plotting in almost all the episodes, I think writing out all the multi-line ggplot commands in the raster vector lesson can get repetitive.
I still think ggplot is essential to show in this lesson, but I think it'd be better placed in the Publication quality graphics episode to allow instructors more time to cover the material in a 2-day format and because users very well may want a faster and simpler interface for plotting and will use that more often than ggplot for geospatial data.
The raster time series lesson has learners plotting RGB satellite imagery using
ggplot
- the exercise even shows them how to create a RGB column. However, the earlier multi band raster lesson never usesggplot
, but instead usesplotRGB
. Either we should useplotRGB
in the time series lesson, or introduce usingggplot
for multi band rasters in lesson 5. I favor the later, as we useggplot2
heavily later on. Something to ponder.