migration from https://code.google.com/p/m-lab.analysis/