Fun with Point of Sale data from Rex Tremendae

[Edit: charts below updated, with feedback from Tim Cameron.]

About a year ago, my brother and I signed our first commercial lease, a claim to use 18 square metres up the dodgy end of Flinders Lane for up to nine years. Today, Rex Tremendae, our cafe, is ticking along quite well. Our fantastic customers—basically everyone’s a regular—appear to like us, and on the whole it’s beginning to look as though it won’t be the world’s worst investment.

Below are a few charts from some analysis I pulled together, based on transaction-level data from our point-of-sale system. The time period covered is October 2014 – January 2015. All the charts are produced in ggplot2 (from within R). Y axes are sales in dollars, but I’ve censored these as I’d prefer not to tell our competitors how much we’re selling!

Note that the figures have been scaled down to fit within this awful WordPress theme. Click through for full size.

How does the weekly cycle look?

When ordering inputs (milk, pastries, deli items etc.) we need to have a bit of an idea which days are more likely to be busy. One thing is for sure—there is a cycle through the week, with Thursdays and Fridays quite a bit busier. The red line is my very rough estimate of total daily running costs—of course, costs increase with sales, but marginal costs in the cafe business are very small compared to fixed (or semi-fixed) costs.


Are same-day sales going in the right direction?

The big question here is how sales are going, comparing like days with each other. I’ve fit a linear trend-line to each of the series, which also has 95% confidence intervals around the line. On the whole, the slopes are in the right direction, though we’ve not enough observations to be sure that it’s not noise. Again, the red line gives me some indication of average daily running costs.



When are we busy?

Rex is very small, and has no indoor seating. While we do make the most delicious toasties on the planet (salami, chevre, tomato tapanade and spinach is my fav), our customers don’t buy many of them. Instead, they seem happy to queue out the door for the delicious coffee (roasted by Rob, my brother) each morning.

The plot below illustrates the sales through the day. The x-axis is the time, the y-axis is the sales (in dollars, again, censored), and the curve fit through them is a smoothed sales profile. The red horizontal line gives the average hourly cost through the day. As you can see, afternoons aren’t an especially profitable time for us (though the true costs of being open then tend to be lower, as one of the staff knock off, or Rob uses the time to go and roast beans/work with wholesale clients).



Are we winning business within certain times?

Another question I’ve been asking is whether the after-lunch coffee market is improving? If there’s no improvement, then we need to think about changes in strategy. Thankfully, there does seem to be some improvement over time.

The chart below illustrates sales through the day and sales-by-the-hour over time. Each box represents an hour of the day; the points on the left come from October, and the points on the right are from December. The lines fitted are the linear trend lines with 95% confidence bands. As you can see, there is considerable growth in the 10-11 segment, and from 1-4, though the trend-lines in the afternoon aren’t too strong.


How bad is January really?

Bad. I’d heard about January being a crap month in hospitality, but our January was really quite crappy. It didn’t help that Rob and Effi (his partner) spent half the month in Germany seeing Effi’s folks. Or that all of our customers were on holidays. Or that the weather was bad. It was crap!

The chart below illustrates this. The height of the lines indicates the sales per hour, and the X axis is the time of day. The red line is January.



That’s all for now folks. If there are any cuts of the data you’d like to see, do let me know.


Rex Tremendae on Urbanspoon


  1. Jack Fuller said,

    February 15, 2015 @ 10:56 pm

    Fascinsting graphs. So interesting to look at data like this – or rather just exciting to see a project going well! Awesome job.

  2. khakieconomist said,

    February 15, 2015 @ 11:32 pm

    Thanks Jack!

  3. Jack said,

    February 16, 2015 @ 4:19 pm

    [R]eally nice work. Can I order that with a small palette of library(RColorBrewer) ?

  4. khakieconomist said,

    February 16, 2015 @ 9:07 pm

    I recall reading somewhere that successful businesses sell 70% what their customers thinks they want, and 30% what customers should want. Colours chosen randomly by virtue of being the same distance around the colour wheel probably fit in neither category.

    If you want to check our our corporate colour palette, perhaps take a look at

RSS feed for comments on this post