The Core
Git Log in Calendar View
For those interested, here’s how I made the git logs into the calendar view in the previous excuse-ridden post on why edgeyo‘s development has been slow the past 1.5 months.
- Thehe git log is piped into a csv file:
- Here’s what the csv looks like
- A table of commit counts is created with Excel’s pivot table – with Date and CommitCount as columns. The file is saved as edgeyoCommits.csv
- R is used to create the visualization (ggplot2 and RColorBrewer is required):
- Clean up in Photoshop!
xuanyi@gallifrey:~$ git log master --date=short --pretty=format:"%h%x09%an%x09%ad%x09%s" > edgeyoCommitLog.csv


df <- read.csv('edgeyoCommits.csv') #load the csv
df$Day <- strptime(df$Date, "%d/%m/%Y")$wday #define Day
df$Week <- -(strptime(df$Date, "%d/%m/%Y")$yday %/% 7 + 1) #define Week
df$Month <- strptime(df$Date, "%d/%m/%Y")$mon #define Month
library(ggplot2) #load ggplot2
library(RColorBrewer) #load RColorBrewer
p <- ggplot(df, aes(x = df$Day, y = df$Week, fill=df$CommitCount)
plottedP <- p + geom_tile()
+ scale_fill_gradientn(colour=brewer.pal(5, "Blues"))
+ facet_wrap(~ Month, nrow = 1)
finalP <- plottedP + opts(panel.background = theme_rect(fill='#FFFFFF', colour='#FFFFFF'))
finalP
And this is how the final product looks like:

Notes
- This visualization uses geom_tile. Documentation can be found here. facet_wrap was also used.
- Only the Master branch was visualized. This was because the topic was actually about the Master branch – that’s the branch we deploy using.
- Prior to creating the pivot table, the log file was scrubbed of any commits that are less than 20 lines
- For purpose of analysis, we analyzed only commits from the 27th of December, since that’s when edgeyo actually became truly public facing.
Discussion
- What can be done better? Here’s an idea: There are four of us, it would be very simple to split the day out into four quadrants, with each quadrant representing one person.
- Is this a better visualization than gitk’s graph? It depends. For the context of the previous blog post, trying to figure out where we went wrong, it was useful. It was immediately apparent once we placed events on dates (an embarassing amount of personal circumstances were slowing us down a lot).
- The Use of Visualization We use visualization a lot internally in edgeyo. ggplot2 and other tools are useful for us when doing analyses of our users (yes, we know edgeyo is not running at its full capacity yet, but we’ve already done quite a bit of analyses). Good news is we’ve decided that we will share them more often on the blog
. Tell me what you think?
Latest Tweets
- OK time to focus on shipping! 2 months ago
- LOL. Just happened: @zybler: I found a bug, but it is unlikely to happen in real life. @roguejs, @cfgt and @chewxy simultaneously: WHAT BUG? 2 months ago
- The problems of coordinating meetings in 3 different time zones: everytimezone.com solves a bit 2 months ago
- Mid starcraft 2 game, a user signs up to #edgeyo and completes a startup profile. The wonders of a dual screen setup! http://t.co/zTFEdIWJ 3 months ago







