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
Intergrating tmap and qtm() for quick visualization of raster/vector data #307
Comments
Hi @dcarver1, you might be interested in previous discussion of |
I'm working through these lessons in preparation for teaching an upcoming workshop and want to second the opinion that ggplot2 is the wrong choice for much of this material, for the following reasons:
@jsta if your daily work, if you load a raster for the first time and want to quickly visualize it to see what you're dealing with, do you actually go to the trouble of typing all the ggplot syntax? For context, I'll say that I'm a diehard Tidyverse/ggplot fan in almost all scenarios, and I do often use it for vector data, but despite that I don't think it's the way to go for raster plotting. I also agree with @jsta that adding a new tool (tmap) is problematic, so why not use To be clear, I'm just referring to raster data here, vector plotting is a different story. |
True, I rarely type out the ggplot syntax for rasters in my daily work. My goto is actually My opinion is that we should leave the written lesson material in ggplot but individual instructors can sub-out or supplement the ggplot code with One sticking point I see is how to handle lesson 11, which combines vector and raster layers, if we drop ggplot for rasters but don't drop ggplot for vector layers. |
Hello,
I appreciated the direction and overall need for this lesson, but as I was working through, I couldn't help but think to myself that this was a lot of flipping rasters to data frames and building out ggplot statements.
I understand the utility of ggplot, and it should be a core part of this lesson. Yet, in my workflows with spatial data in R, I rely heavily on the library tmap and the function qtm to provide quick visual checks of the data.
For example, lesson 4 we plot a df derived from a raster with the following code
We could send a few less minutes typing (these ggplot elements are used later in the lesson) and use a single line as this is just for visualization purposes.
Yes, we loose some controll and visualization techniques, but I just don't think we need to worry about the color gradiaent or the legend name in cases where we just want to see what we are working with.
Again, for me, this all comes back to wanting to spend more time talking about spatial data and less time typing out ggplot statements. This may be outside the framework of the lesson, but I'm curious what others think about it.
The text was updated successfully, but these errors were encountered: