Seanlog

Count what Tehloki says between day changes.

ff = readLines("http://tehloki.com/seanlog")
vec = c()
dvec = c()
stdate = as.Date("2012-05-22")
idx = 0
day = 0
for (te in 1:(length(ff) - 1)) {
    idx = idx + 1
    if (length(grep("Day changed", ff[te], value = TRUE)) != 0 & ff[te] != "") {
        day = day + 1
        vec = c(vec, idx)
        dvec = c(dvec, as.character(as.Date(stdate + day)))
        idx = 0
    }
}
dvec = as.Date(dvec)

And now a plot:

plot(vec ~ dvec, type = "l", ylab = "Lines")

plot of chunk unnamed-chunk-2

Break down by day of week:

data = data.frame(cdate = dvec, count = vec)
data$days = format(data$cdate, "%A")
daysum = aggregate(data$count, list(data$days), FUN = sum)
daysum$Group.1 = factor(daysum$Group.1, levels = c("Sunday", "Monday", "Tuesday", 
    "Wednesday", "Thursday", "Friday", "Saturday"))
plot(daysum$x ~ daysum$Group.1, type = "S", cex.axis = 0.8, xlab = "", ylab = "lines", 
    ylim = c(0, 180))

plot of chunk unnamed-chunk-3