Ray Miller's Personal Website

Aero meets SSM

Clojure DevOps

Aero is a small configuration library from JUXT that extends Clojure’s EDN reader with support for tags to interpolate values from environment variables, coerce these values to a specific type, use simple conditionals, and several other useful features. It is also easily extensible through the aero.core/reader multimethod. We have been using EDN files to configure our Clojure applications at Metail for some time, so aero is a natural fit for us.

27 Jan 2018 #clojure #devops #cloud #aws

Think Stats: Our First Histograms

Clojure Statistics

This is the fourth instalment of our Think Stats study group; we are working through Allen Downey’s Think Stats, implementing everything in Clojure. This week we made a start on chapter 2 of the book, which introduces us to statistical distributions by way of histograms. This was our first encounter with the incanter.charts namespace, which we use to plot histograms of some values from the National Survey for Family Growth dataset we have worked with in previous sessions.

8 Apr 2016 #clojure #incanter

Google Sheets

Clojure Development

One of the user stories I had to tackle in a recent sprint was to import data maintained by a non-technical colleague in a Google Spreadsheet into our analytics database. I quickly found a Java API for Google Spreadsheets that looked promising but turned out to be more tricky to get up and running than expected at first glance. In this article, I show you how to use this library from Clojure and avoid some of the pitfalls I fell into.

24 Mar 2016 #clojure

Think Stats: Exploring Data

Clojure Statistics

This is the third instalment of our Think Stats study group; we are working through Allen Downey’s Think Stats, implementing everything in Clojure. In the previous part we showed how to use functions from the Incanter library to explore and transform a dataset. Now we build on that knowledge to explore the National Survey for Family Growth (NFSG) data and answer the question do first babies arrive late? This takes us to the end of chapter 1 of the book.

29 Feb 2016 #clojure #incanter

Think Stats: Cleaning and Augmenting Data

Clojure Statistics

This is the second instalment of our Think Stats study group; we are working through Allen Downey’s Think Stats, implementing everything in Clojure. In the first part we implemented a parser for Stata dictionary and data files. Now we are going to use that to start exploring the National Survey of Family Growth data with Incanter, a Clojure library for statistical computing and graphics. If you’d like to follow along, start by cloning our thinkstats repository from Github:

14 Jan 2016 #clojure #incanter

Think Stats: Getting Started

Clojure Statistics

One of our new starters here at Metail was keen to brush up his statistics, and it’s more than 20 years since I completed an introductory course at university so I knew I would benefit from some revision. We also have a bunch of statisticians in the office who would like to brush up their Clojure, so I thought it might be fun to organise a lunchtime study group to work through Allen Downey’s Think Stats and attempt the exercises in Clojure.

11 Dec 2015 #clojure #incanter

Computing Partitions

Clojure Development

In an earlier article on optimization, we evaluated all the different ways of splitting 13 items into sets of 5+4+4 and, applying a cost function to each partition, found one that minimised the total cost. It turned out that the partition 13=5+4+4 gave an optimal solution, but we didn’t know in advance that this would be the case: perhaps splitting the items into 13=6+4+3 would have been better. The careful reader may also have noticed that the algorithm we used to generate the partitions produced duplicate entries.

21 Jun 2013 #clojure

A Little Optimization

Clojure Development

The other day I had to plan some capillary sequencing experiments for our lab. Each sequencing experiment takes a DNA sample and set of primers as input. The primers and DNA are stored on 96-well plates, which are loaded onto a Tecan liquid-handling robot for picking. We have to generate 707 sequencing reactions from 436 samples, with the DNA coming from 13 plates and the primers from 47 different plates.

11 Jun 2013 #clojure