A library to calculate electricity rates