As a devotee of Tufte, I'm generally against chartjunk. Graphical elements that obscure interpretation of the data occasionally have a useful role to play, but more often than not that role is to entertain the expense of enlightenment, or worse, to actively mislead. So it's with mixed feelings that I refer you to catterplots, an R package by David Gibbs to create scatterplots using outlines of cats as the symbols.
But hey, it's the Friday before a long weekend, so here's a poorly annotated catterplot of households with dogs vs households with cats in the 48 continental US states (plus DC):
The data behind this chart I found at data.world, which looks to be an interesting new resource for data sets. (Registration is required to download data, however.) The code behind the chart is below. (If you want a variant featuring Nyan Cat, try cat=11
.)
dogscats <- catplot(dogs, cats, size=0.1, catcolor=c(0.7,0.7,0.7,1), cat=3, xlab="Households with dogs", ylab="Households with cats", main="Household Pet Ownership in US States")
The catterplot package is available for on GitHub at the link below.
GitHub (GibbsDavidl): Catterplots
How old are you? Do you think that the scientific comunity is interested by these patetic graphs?
Please do not disturb a seriosus blog such as R-Blogers
Posted by: Juan Pilar | February 17, 2017 at 13:15
Wow... I can't even tell whether those axes are lin or log! What are the units? Number of pets per square meter? number of houses with pets per 100,000 homes?
And you haven't even color-coded the cats by, say, average number of bathrooms per domicile :-)
Posted by: Carl WItthoft | February 21, 2017 at 06:23
It's my sister who will be happy
Posted by: Tanguy | February 22, 2017 at 13:32
Hi! Great post :) I really want to prank my supervisors with catterplots in my thesis, but I don't understand how to install it in R. Do you have any tips? Install.packages('CatterPlots') returns that there is no such package. Am I missing something?
Posted by: E | February 23, 2017 at 03:58
E, you'll need to install catterplots from github using the devtools package. The instructions are on the github page linked above (scroll down a bit).
Posted by: David Smith | February 23, 2017 at 06:52