DVC Day 12

(This Post is part of my 30 day Data Visualization Challenge – you can follow along using the ‘challenge’ tag!)

I, too, was disappointed in yesterday. I spent some time looking at the data, and figured maybe a different approach would yield more information – part of what made yesterday’s chart a bit unwieldy was the amount of information. I reduced the subset to only carat weight below one, and plotted a density graph of carat alone, with fill color defined with a cohort’s clarity:

Screen Shot 2015-04-21 at 8.47.58 PM

Thoughts:
– Now we’re cooking! Look at that – it looks like under half a carat, the “IF” clarity completely dominates the other categories. This was not at all evident from yesterday’s visualization.
– Again, using the Brewer Palette – these are really sharp, and have palette options for lots of different use cases. Is it weird that I’m excited about this?
– Remember, these are not all of the diamonds, but only those with the color “J”

Code:

library(ggplot2)
jsmaller = subset(diamonds, color="J", carat <= 1)
plot.jsmaller = qplot(carat,data=jsmaller,fill=clarity, binwidth=.01, geom="density")
plot.jsmaller + scale_color_brewer(palette="Set1")

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s