Closed mlaviolet closed 6 years ago
I'd say we have thoughts rather than plans. We know it needs to be done, we just need to figure out who will have time when.
My next push is to get Foundations and Applications of Statistics (2nd ed.) to the publisher. That book has been updated to use ggformula
and some of the newer features of mosaic
.
I certainly empathize. Thanks for the prompt response.
Thanks for the gentle reminder.
I had a student help me to convert the materials from IS4 (https://nhorton.people.amherst.edu/is4) and another one geared up to do the same for SDM4 (https://nhorton.people.amherst.edu/sdm4). The process of doing the same for the Student Guide is pretty straightforward (but volunteers to assist would be welcomed!) The Start Teaching Guide needs a pretty comprehensive overhaul. And unfortunately, Start Modeling is still in a preliminary state.
See also discussion in https://github.com/ProjectMOSAIC/mosaic/issues/647
but volunteers to assist would be welcomed!
Not being a native speaker but teaching Intro Stats with mosaic I would like to help this project.
I'm hoping to gear up to start to migrate some of the mosaic textbook resources and LittleBooks away from lattice. My default plan was to move to ggformula, but I wonder if it would be worthwhile discussing whether ggplot2 would be a better graphics environment to have by default.
I'd welcome any discussion of two options: moving from lattice to ggformula (https://github.com/ProjectMOSAIC/ggformula) or moving from lattice to ggplot2.
Advantages of ggformula: 1) same use of formulas throughout 2) ggplot2-quality graphics 3) simpler
Disadvantages of ggformula: 1) need to add %>% as a learning outcome (but it's consistent with other tidyverse tools 2) minimal examples outside of the mosaic website and vignettes 3) one eventually outgrows it (but with a firm understanding of formulas in R, so it's not a wasted effort)
Advantages of ggplot2 1) Much more standard: easy to find solutions to problems on StackOverflow
Disadvantages of ggplot2 1) Different syntax (non-formula based) 2) Generally more complex to do the same thing (unless one uses qplot(), which feels like a dead end 3) need to add "+" as a learning outcome as well as %>%
My two bits ... I'm firmly convinced that the formula approach is better for the people involved in StatPREP. As for instructors who are already using mosaic, I suspect they will find the transition from lattice to ggformula much easier than moving to ggplot.
I think the simple template approach is one of the important contributions of mosaic, and wouldn't want to move away from it.
-Danny
On Sat, Feb 10, 2018 at 10:28 AM Nicholas Horton notifications@github.com wrote:
I'm hoping to gear up to start to migrate some of the mosaic textbook resources and LittleBooks away from lattice. My default plan was to move to ggformula, but I wonder if it would be worthwhile discussing whether ggplot2 would be a better graphics environment to have by default.
I'd welcome any discussion of two options: moving from lattice to ggformula (https://github.com/ProjectMOSAIC/ggformula) or moving from lattice to ggplot2.
Advantages of ggformula:
- same use of formulas throughout
- ggplot2-quality graphics
- simpler
Disadvantages of ggformula:
- need to add %>% as a learning outcome (but it's consistent with other tidyverse tools
- minimal examples outside of the mosaic website and vignettes
- one eventually outgrows it (but with a firm understanding of formulas in R, so it's not a wasted effort)
Advantages of ggplot2
- Much more standard: easy to find solutions to problems on StackOverflow
Disadvantages of ggplot2
- Different syntax (non-formula based)
- Generally more complex to do the same thing (unless one uses qplot(), which feels like a dead end
- need to add "+" as a learning outcome as well as %>%
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/mosaic/issues/686#issuecomment-364668290, or mute the thread https://github.com/notifications/unsubscribe-auth/AAggrZvGvvnkPwSq2UTk6EVW9ncreI-4ks5tTcOygaJpZM4RA9WI .
My point of view as a "user" - i.e. teaching IntroStats with R mosaic: the "Minimal R" approach of mosaic (and ggformula) can help students to focus on conceptual understanding (and modeling aspect) of statistics via the simple and consistent formula template. I see the advantages of ggplot2 but I think for my IntroStat courses I would prefer ggformula.
@dtkaplan points out ggformula makes sense for instructors that are already using mosaic. I agree. But, it's not clear that ggformula will entice instructors that are familiar with ggplot, but don't use mosaic, to use mosaic + ggformula.
I vote for ggformula. The consistency of syntax (with mosaic) is a big advantage. Adding %>% as a learning outcome is valuable on its own. I often wish that %>% were the only way I had learned how to create subsets, etc.
I'll add a couple more reasons that I like ggformula
(and pretty much use it in place of ggplot2
for everything I do now).
ggplot2
before) really take to it.ggformula
to ggplot2
doesn't really cost much, if/when you want to do that. Use of formulas (at least for modeling, and perhaps also for mosaic
) is going to be on the list one way or another. And once you have the basic layering/attributes system down in ggformula
, you only have to learn the aes()
/ +
syntax, which you would have had to learn anyway.gf_refine()
let's you introduce any elements of ggplot2
that you want/need in the meantime.The biggest downside I see is that ggformula
is a bit player compared to ggplot2
(and lattice
). So there are far fewer examples, you won't be able to get as much help online, etc. In an intro course, I don't think this is a big deal. (I find that those students tend to get more confused by googling about for solutions because they don't recognize which solutions play well with what I'm teaching them and which don't, and I try hard to give them the support they need so that they don't feel compelled to do the google search in the first place.)
We could consider creating some sort of document about translating between ggplot2
and ggformula
. This could be used in both directions: for people ready to migrate away from ggformula
and for people trying to translate things they see done in native ggplot2
into ggformula
.
I agree that in an intro course less online examples shouldn't be a deal breaker.
A document translating between ggplot2
and ggformula
is a nice idea.
I would love to see a document translating between ggplot2
and ggformula
. I haven't spent much time pushing on it, but my initial impression is that ggformula
didn't have the full power of ggplot2
. I'd love to be proven wrong!
Start by making a list of things that you didn't know ggformula
can do, and we'll see how close we come to the full power of ggplot2
.
Likely things will fall into three categories:
ggformula
makes it easyggformula
, but you need things like gf_refine()
together with a "native" ggplot2
function. (Some of these things could perhaps be folded into ggformula
to make them easier if there were enough value in doing so.)My initial goal was to build a system that made a lot of ggplot2
easily usable with a formula interface in a consistent way and from there to support some of the most important ways to modify how the plot is displayed. Over time things get added if (a) they seem useful enough (I suppose there is a question here regarding the target audience and what it uses) and (b) they can be implemented without too much pain and agony.
In particular, I'd prefer it if changes to ggplot2
don't require much retro-fitting in ggformula
, and I've tried to design things that way. Fortunately, ggplot2
is pretty stable at this point, so that helps.
I'm moving the discussion of a side-by-side comparison of ggplot2
and ggformula
to https://github.com/ProjectMOSAIC/ggformula/issues/67.
I'll vote for ggformula due to the consistency. Meanwhile, I've posted an RStudio-style cheatsheet. It uses lattice since that's the current documentation, but transition to ggformula should be straightforward. If anyone has ideas, drop me a note. https://github.com/rstudio/cheatsheets/raw/master/mosaic.pdf
@mlaviolet That's nice! Did you post the source file (e.g. ppt, keystone, ...?) so that others might customize it?
@dtkaplan: There is a (rather new) LaTeX Stylefile so that it is easy to generate cheatsheets via Rmd. Our (German) version: https://github.com/NMarkgraf/DA-R-Cheatsheet
Thanks! The PowerPoint is at the link below. If anyone wants to modify it for ggformula, drop me a note.
https://github.com/mlaviolet/Mosaic-cheatsheets/blob/master/mosaic-cheatsheet-lattice.pptx
Also should consider updating the Open Intro labs: https://www.openintro.org/stat/labs.php?stat_lab_software=R%20Mosaic
Thanks for the update on the Student's Guide. I've revised my cheat sheets for ggformula graphics and posted them here with source powerpoints and PDFs.
Excellent. Thanks!
Now that mosaic supports ggplot graphics, are there any plans to update the Student's Guide, Start Teaching, and Start Modeling documents? Thanks.