Blogs

Durban EDGE DataQuest

A couple of quick R starter scripts for the Durban EDGE DataQuest.

An API for @racently

Retrieving running data using the @racently API.

Scraping Machinery Parts

Scraping prices from a supplier of replacement parts for heavy machinery.

Installing Prophet on CentOS

How to install the Prophet package for R on RHEL or CentOS.

Private Security and the Pareto Principle

Private Security is a big industry in South Africa. Most Private Security companies promise to provide a rapid response to every callout generated by any of their customers. There is a delicate balance between the number of response vehicles and the number of customers (and the frequency of their callouts!), which determines whether or not they are able to honour this promise. On the one hand, more response vehicles result in lower response times.

Tweaking Linux for Pernickety Projectors

Linux has really come a long way. I used to arrive at the podium and hook up my (Linux) laptop with the resigned expectation that there would be some tweaking involved to get it to speak to the projector. However the support for video hardware has evolved massive and nowadays I don’t ever think about this: it just works. Until it doesn’t. This week I was speaking at a conference where the video setup was extremely pernickety.

MySQL Backups

Your data are valuable. If, God forbid, some disaster befalls your database then you should have a plan in place for how to recover your data. In this post I describe a simple strategy for backing up a MySQL database. This might not be the best approach, but it has worked for me.

R, Docker and Checkpoint: A Route to Reproducibility

I need to deploy Shiny on a Windows machine. I also need to use {checkpoint} for package management. Using Docker seems to be the only reasonable approach to Shiny on Windows. But how easy would it be to also factor {checkpoint} into this setup? Only one reasonable way to find out: give it a try. Below is the simple Dockerfile I used. Here are the fundamental components of what it does:

All Roads Lead to Rome

I was inspired by this visualisation, showing the optimal routes (by car) from the geographic centre of the USA to all counties. The proverb “All Roads Lead to Rome” immediately came to mind and I set out to hack together something along that theme. This is what was required: Find a list of major cities in Europe and Asia. Use OSRM to generate routes from each of these cities to Rome.

Using Shared Memory with OSRM

If you have multiple applications accessing OSRM data then it does not make sense for each of those to have a separate copy of the data resident in memory. This is especially true if you’re using a relatively large map, in which case memory consumed by multiple processes might be enormous. An alternative is to store the map data in shared memory, allowing multiple processes to access a single copy of the data.