I deal a bit with textual data across various grouping variables. I'm thinking of creating a method to make faceted wordcloud plots using Ian Fellows' wordcloud
package. I like the way ggplot2
facets social variables. I'm deciding how to approach this problem (faceted wordcloud plot).
Is it possible to use Fellows' work as a geom (I've never made a geom but may learn if this is doable) or will ggplot not play nicely because one is grid and one is base (and wordcloud also uses some C coding) or some other problem? How difficult is this (I know this is dependent on my abilities but would like some ball park answer)? Please advise if using base graphics may be the more sensible approach to this problem. I foresee this may be approached using panes
from the plotrix
package to give it the aesthetic feel that ggplot's faceting gives.
Maybe this is a foolish concept considering the size of word clouds and the way faceting quickly limits the available space.
This may be a pipe dream, and it certainly isn't easy to re-use the wordcloud
code:
wordcloud
code calculates word sizes and positions in base graphics.In terms of making it work, a framework for designing a solution might be:
wordcloud
to calculate word sizes in grid graphics, rather than base graphicsstat_wordcloud
geom_text
to a new geom_wordcloud
So, it's a pipe dream, but I'd be keen to use it once you've made it ;-)
This is a possible solution using ggplot2 style: https://github.com/lepennec/ggwordcloud
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With