def get_energy_diff(data):
    """
    Compute the differences between data points in the
    time series of tuples (date, vt, mt). The result is
    a list of (date, vt_delta, mt_delta) with vt_delta
    and mt_delta being the amount of energy at date since
    the preceding date point.
    """

    diff_data = [ [ d[0] for d in data[1:] ] ]
    for c in range(1, 3):
        diff = [ b[c] - a[c] for a, b in zip(data[:-1], data[1:]) ]
        diff_data.append(diff)

    return list(zip(diff_data[0], diff_data[1], diff_data[2]))