I'm trying to replicate the beautiful visualization at Google's Rhythm of Food with my own data set showing how many people my company hired per week. The dataset (named hiresbyweek) looks like this (this is 25 of 81 rows, link to full dataset here)
Week Year total.Hires Month WeekNum
2014-05-05 0:00:00 2014 1 May 18
2014-05-12 0:00:00 2014 1 May 19
2014-05-19 0:00:00 2014 1 May 20
2014-05-26 0:00:00 2014 1 May 21
2014-08-04 0:00:00 2014 1 August 31
2014-09-08 0:00:00 2014 1 September 36
2015-02-23 0:00:00 2015 3 February 08
2015-03-23 0:00:00 2015 4 March 12
2015-05-04 0:00:00 2015 1 May 18
2015-06-01 0:00:00 2015 1 June 22
2015-06-08 0:00:00 2015 1 June 23
2015-09-14 0:00:00 2015 3 September 37
2015-09-21 0:00:00 2015 4 September 38
2015-09-28 0:00:00 2015 15 September 39
2015-10-05 0:00:00 2015 20 October 40
2015-10-12 0:00:00 2015 47 October 41
2015-10-19 0:00:00 2015 40 October 42
2015-10-26 0:00:00 2015 39 October 43
2015-11-02 0:00:00 2015 5 November 44
2015-11-09 0:00:00 2015 2 November 45
2015-11-16 0:00:00 2015 7 November 46
2015-11-23 0:00:00 2015 1 November 47
2015-11-30 0:00:00 2015 7 November 48
2015-12-07 0:00:00 2015 3 December 49
2015-12-14 0:00:00 2015 7 December 50
Currently I've made it as far as this:
ggplot(hiresbyweek,aes( x=WeekNum, y=total.Hires,fill=as.factor(Year)))
+geom_histogram(stat="identity", aes( x=WeekNum, y=total.Hires,fill=as.factor(Year)))
+coord_polar()
+scale_fill_manual(values=c("#ACD9F4","#005DA6","#EC008C"))
+scale_x_discrete(labels = as.factor(hiresbyweek$Month))
+scale_y_discrete(expand=c(0.5,0))
+theme(text=element_text(family="Avenir")
, axis.ticks = element_blank()
, panel.grid = element_blank()
, panel.background = element_blank()
)
This produces something close:
The Essential problem is:
1) those labels are no where close to where they should be: note how the largest numbers are at October but according to the chart they would be mostly in April or March.
The Nice to haves:
1) I'd like to group and rotate those titles a la the rhythm of food charts, so there would be simpler labels
2) I'd like to greatly reduce the relative size of said bars; I've done it as count (geom_historgram(stat="count") or stat="bin") but that makes them all equal and removes the importance of scale, which is the key thing here.
3) I'd like to insert some whitespace between the bars. I've tried adding in color="white" a la both ggplot(hiresbyweek,aes( x=WeekNum, y=total.Hires,colour="white",fill=as.factor(Year))) and geom_histogram(stat="identity", aes( x=WeekNum, y=total.Hires,fill=as.factor(Year), color="white")) which both oddly got a pink outline...
help on the first part is most important (I'd feel it was presentable then) but any and all welcome. Thank you for your time and thoughts.


+sign must be on the end of the line - GGamba