I use R and ggplot2 for my publication style plots. It has everything that I want for this task. However, in the exploratory stage of the data I would like to have something which allows for some interactivity.
For example I have a data frame with various variables. These variables are of different types, namely :
- Quantitative continuous,
- quantitative discrete,
- nominal, and
These variables can be mapped to aesthetics:
- Position (all)
- Hue (all)
- Size (continuous, discrete, nominal)
- Shape (ordinal)
- Saturation (continuous, discrete, nominal)
- Facets (nominal, ordinal)
With ggplot2, it is easy to produce a plot and mapping the variables (columns) of a data frame to these aesthetics:
ggplot(offensive, aes(x = Tons, y = Damage)) + geom_point(aes(color = Slots)) + red_green_gradient + facet_grid(Faction ~ Type, labeller = label_both)
The same data can also be displayed using different variables mapped to different aesthetics:
ggplot(filter(offensive, Faction == 'Clan', Type == 'Ballistic'), aes(x = HPS, y = DPS)) + geom_point(aes(color = Tons, size = Slots)) + red_green_gradient + expand_limits(x = 0, y = 0) + geom_text_repel(aes(label = Name), point.padding = 1.5, box.padding = 0, arrow = arrow(length = unit(0.01, 'npc'))) + labs(title = 'Clan Ballistic Weapons')
In this example I have also filtered the data to visualize only one subset of the above data.
This is all very great. But when I sit together with some other person, they usually want to look at the data in a different way. They will want to change the range of the axes, want different variables or different filters. Currently I have RStudio with Rmarkdown open and can just change the code and re-generate the plot.
But I wish for some software that would allow them to interactively explore the data set, something like this:
Using the drop-down they could easily change the axes, the sliders for the range. With the checkboxes they could put various variables on the other aesthetics. One can combine multiple nominal variables in a new nominal variable using R's
interaction function, so I want checkboxes and not just radio buttons. One would have to carefully allow the options there, but this should be a solvable problem. It would be great if it runs completely in a web browser without a fancy server backend.
Ideas so far:
R Shiny. This seems to be a close fit. I could generate the UI within R and therefore expose all the variables in the data frame as UI elements. Also I could try to classify the data and allow it for useful aesthetics.
Filtering would also be possible using R's
dplyrlibrary. There in the UI Code I could just offer drop-downs which allow to select one particular value or not filter in this variable. This should be enough flexibility.
The drawback is that it needs an R backend, which I cannot host on my shared hosting website. It is still viable to use in a group meeting or presentation, but setting this up such that other people can play with it on their machine would require some hosting service. This might be worth it, but perhaps not my first choice.
Are there other options that I missed?