R bubblecharts

Nice R bubblechart tutorial at Flowing Data.  Since ggplot2 is all the rage, I thought I’d give it a spin.  Here’s the result

qplot(data=crime, x=murder, y=burglary, 
	main="2008 State Crime Data", xlab="murders per 1000", ylab="burglaries per 1000") + 
	geom_text(aes(label=state), size=2.25, angle=45, hjust=1, vjust=1, color="blue") +
	geom_point(aes(size=population/1000), color="orange", alpha=0.7) +

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s