radiant-rstats / radiant

Business analytics using R and Shiny. The radiant app combines the menus from radiant.data, radiant.design, radiant.basics, radiant.model, and radiant.multivariate.
https://radiant-rstats.github.io/docs/
Other
455 stars 130 forks source link

shape and alpha visuals in "Visualize"? #36

Open DataStrategist opened 6 years ago

DataStrategist commented 6 years ago

Hi, just a quick question... I'm guessing you left out the alpha and shape elements out of visualize for simplicity... and deal with the multiple x variables by faceting... it's pretty elegant all in all. It's true that shape can be quickly abused...

I do think however the alpha is fairly bombproof... and adds a lot of value for medium-large datasets in terms of allowing point clusters to be more easily visualized if alpha =0.1 for example.

Are you interested in having a conversation about the inclusion of both of these?

vnijs commented 6 years ago

alpha is "Opacity" in the Data > Visualize tab which can vary between [0, 1]. I haven't used shape much can you post a good example using that with a public data (or dput) and code?

Note that you can always customize graph by setting custom = TRUE and adding geoms with geom_shape(...)

DataStrategist commented 6 years ago

Ahhhh... I see the Opacity now. I'm sorry man... I seem to be unable to find things you've done over and over! I should just play with everything before opening another issue!

In trying to come up w/ a good reprex of a case study where shapes would be useful, I came to the realization that they aren't very useful! :laughing: . I think the shape aesthetic is most useful in small data, or simple comparison but falls apart in large datasets. Still, it provides another alternative to color. A simple reprex... albeit one that doesn't really show that it's very useful:

diamonds %>% 
  mutate(colorCat= case_when(
    color == "D" | color == "E" | color == "F" ~ "colorless",
    color == "G" | color == "H" | color == "I" | color == "J" ~ " near colorless"
  )) %>% ggplot(aes(x=carat,y=price,color=clarity,shape=colorCat)) + geom_point()

image

I mean, it's fairly simple to implement, it can be passed just as easily as the color metric... but it's probably unnecessary. Shall I close?

vnijs commented 6 years ago

I'll see if I can add it as an option in R > Report. Will leave it open for now