Skip navigation

Naomi Robbins is running a graph makeover challenge over at her Forbes blog and this is my entry for the B2B/B2C Traffic Sources one (click for larger version):

And, here’s the R source for how to generate it:

library(ggplot2)
 
df = read.csv("b2bb2c.csv")
 
ggplot(data=df,aes(x=Site,y=Percentage,fill=Site)) + 
  geom_bar(stat="identity") + 
  facet_grid(Venue ~ .) + 
  coord_flip() + 
  opts(legend.position = "none", title="Social Traffic Sources for B2B & B2C Companies") + 
  stat_bin(geom="text", aes(label=sprintf("%d%%",Percentage), vjust=0, hjust=-0.2, size = 10))

And, here’s the data:

Site     Venue	Percentage
Facebook B2B	72
LinkedIn B2B	16
Twitter	 B2B	12
Facebook B2C	84
LinkedIn B2C	1
Twitter	 B2C	15

I chose to go with a latticed bar chart as I think it helps show the relative portions within each category (B2B/B2C) and also enables quick comparisons across categories for all three factors.

2 Comments

  1. I think that making the xlim 0,100 would improve it. Also, either the whole colour scheme needs to be revised (for the page) or your graph has to fit into that. The horizontal white lines are pointless and the vertical ones could be in thee foreground.

  2. You inspired me to give this a try myself! I posted my entry on my blog with the complete ggplot2 code (http://failuretoconverge.wordpress.com/2012/12/06/forbes-graph-makeover-challenge-ggplot2-style/)


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.